From cb1ef915df5be4d1be2928cbe84ee9c00c5ea2ac Mon Sep 17 00:00:00 2001 From: tedyu Date: Thu, 21 May 2015 10:27:21 -0700 Subject: [PATCH] HBASE-13731 TestReplicationAdmin should clean up MiniZKCluster resource (Stephen Jiang) --- .../hbase/client/replication/TestReplicationAdmin.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java index d1083b85328..e126205ace8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java @@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.replication.ReplicationException; import org.apache.hadoop.hbase.testclassification.ClientTests; import org.apache.hadoop.hbase.testclassification.MediumTests; +import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -68,6 +69,14 @@ public class TestReplicationAdmin { admin = new ReplicationAdmin(conf); } + @AfterClass + public static void tearDownAfterClass() throws Exception { + if (admin != null) { + admin.close(); + } + TEST_UTIL.shutdownMiniZKCluster(); + } + /** * Simple testing of adding and removing peers, basically shows that * all interactions with ZK work