HBASE-24444 Should shutdown mini cluster after class in TestMetaAssignmentWithStopMaster (#1802)

* shutdown mini cluster after class

* fix

Co-authored-by: wen_yi <liu.wenwen@immomo.com>
This commit is contained in:
WenFeiYi 2020-06-09 08:14:18 +08:00 committed by GitHub
parent 2dd34b3f01
commit 3b3bba1b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.client.RegionLocator;
import org.apache.hadoop.hbase.testclassification.LargeTests;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
@ -51,12 +52,17 @@ public class TestMetaAssignmentWithStopMaster {
private static final long WAIT_TIMEOUT = 120000;
@BeforeClass
public static void setUp() throws Exception {
public static void setUpBeforeClass() throws Exception {
StartMiniClusterOption option = StartMiniClusterOption.builder()
.numMasters(2).numRegionServers(3).numDataNodes(3).build();
UTIL.startMiniCluster(option);
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
UTIL.shutdownMiniCluster();
}
@Test
public void testStopActiveMaster() throws Exception {
try (Connection conn = ConnectionFactory.createConnection(UTIL.getConfiguration());