From 97cda4077a7088e487340635c15d1d406a63b791 Mon Sep 17 00:00:00 2001 From: Masatake Iwasaki Date: Tue, 5 Apr 2016 03:19:48 +0900 Subject: [PATCH] HDFS-9599. TestDecommissioningStatus.testDecommissionStatus occasionally fails (Lin Yiqun via iwasakims) (cherry picked from commit 154d2532cf015e9ab9141864bd3ab0d6100ef597) --- .../server/namenode/TestDecommissioningStatus.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java index 1c5d3693b9d..02b5ebbdd62 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java @@ -57,8 +57,8 @@ import org.apache.hadoop.hdfs.server.datanode.DataNodeTestUtils; import org.apache.hadoop.hdfs.tools.DFSAdmin; import org.apache.log4j.Level; import org.apache.log4j.Logger; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.junit.After; +import org.junit.Before; import org.junit.Test; /** @@ -78,8 +78,8 @@ public class TestDecommissioningStatus { final ArrayList decommissionedNodes = new ArrayList(numDatanodes); - @BeforeClass - public static void setUp() throws Exception { + @Before + public void setUp() throws Exception { conf = new HdfsConfiguration(); conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_REPLICATION_CONSIDERLOAD_KEY, false); @@ -113,8 +113,8 @@ public class TestDecommissioningStatus { Logger.getLogger(DecommissionManager.class).setLevel(Level.DEBUG); } - @AfterClass - public static void tearDown() throws Exception { + @After + public void tearDown() throws Exception { if (localFileSys != null ) cleanupFile(localFileSys, dir); if(fileSys != null) fileSys.close(); if(cluster != null) cluster.shutdown();