From 6df8fa1bc935cf808d510aa0d9dbd1f51972d095 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Thu, 17 May 2018 16:53:23 -0700 Subject: [PATCH] HDFS-13556. TestNestedEncryptionZones does not shut down cluster. Contributed by Anbang Hu. (cherry picked from commit a97a2042f210e9db97646baad6f56064d672f447) --- .../hdfs/server/namenode/TestNestedEncryptionZones.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNestedEncryptionZones.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNestedEncryptionZones.java index 59d980c0418..92187d11283 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNestedEncryptionZones.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNestedEncryptionZones.java @@ -35,6 +35,7 @@ import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.util.ToolRunner; import org.apache.log4j.Level; import org.apache.log4j.Logger; +import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -111,6 +112,14 @@ public class TestNestedEncryptionZones { DFSTestUtil.createKey(NESTED_EZ_KEY, cluster, conf); } + @After + public void tearDown() throws Exception { + if (cluster != null) { + cluster.shutdown(); + cluster = null; + } + } + @Test(timeout = 60000) public void testNestedEncryptionZones() throws Exception { initTopEZDirAndNestedEZDir(new Path(rootDir, "topEZ"));