HBASE-13731 TestReplicationAdmin should clean up MiniZKCluster resource (Stephen Jiang)

This commit is contained in:
tedyu 2015-05-21 10:25:51 -07:00
parent 420baa42ce
commit 109f138ca3

View File

@ -27,6 +27,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.replication.ReplicationException;
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;
@ -67,6 +68,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