HBASE-11037 Race condition in TestZKBasedOpenCloseRegion.
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1588610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
25c7577573
commit
b80a597997
|
@ -185,26 +185,6 @@ public class TestZKBasedOpenCloseRegion {
|
|||
|
||||
}
|
||||
|
||||
@Test (timeout=300000) public void testCloseRegion()
|
||||
throws Exception {
|
||||
LOG.info("Running testCloseRegion");
|
||||
MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
|
||||
LOG.info("Number of region servers = " + cluster.getLiveRegionServerThreads().size());
|
||||
|
||||
int rsIdx = 0;
|
||||
HRegionServer regionServer = TEST_UTIL.getHBaseCluster().getRegionServer(rsIdx);
|
||||
HRegionInfo hri = getNonMetaRegion(
|
||||
ProtobufUtil.getOnlineRegions(regionServer.getRSRpcServices()));
|
||||
LOG.debug("Asking RS to close region " + hri.getRegionNameAsString());
|
||||
|
||||
cluster.getMaster().assignmentManager.unassign(hri);
|
||||
|
||||
while (!cluster.getMaster().assignmentManager.wasClosedHandlerCalled(hri)) {
|
||||
Threads.sleep(100);
|
||||
}
|
||||
LOG.info("Done with testCloseRegion");
|
||||
}
|
||||
|
||||
private void waitOnRIT() {
|
||||
// Close worked but we are going to open the region elsewhere. Before going on, make sure
|
||||
// this completes.
|
||||
|
@ -317,16 +297,5 @@ public class TestZKBasedOpenCloseRegion {
|
|||
private static byte [] getTestQualifier() {
|
||||
return getTestFamily();
|
||||
}
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
TestZKBasedOpenCloseRegion.beforeAllTests();
|
||||
|
||||
TestZKBasedOpenCloseRegion test = new TestZKBasedOpenCloseRegion();
|
||||
test.setup();
|
||||
test.testCloseRegion();
|
||||
|
||||
TestZKBasedOpenCloseRegion.afterAllTests();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue