diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestCBlockServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestCBlockServer.java index ecc689b222..4f816e154d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestCBlockServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/cblock/TestCBlockServer.java @@ -22,6 +22,7 @@ import org.apache.hadoop.scm.client.ScmClient; import org.apache.hadoop.cblock.util.MockStorageClient; import org.apache.hadoop.ozone.OzoneConfiguration; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -47,6 +48,13 @@ public static void setup() throws Exception { cBlockManager = new CBlockManager(conf, storageClient); } + @AfterClass + public static void clean() { + cBlockManager.stop(); + cBlockManager.join(); + cBlockManager.clean(); + } + /** * Test create volume for different users. * @throws Exception