HBASE-19558 TestRegionsOnMasterOptions hack so it works reliably

This commit is contained in:
Michael Stack 2017-12-19 15:57:11 -08:00
parent 5e7d16a3ce
commit 3c78ad5215
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
1 changed files with 9 additions and 0 deletions

View File

@ -193,6 +193,15 @@ public class TestRegionsOnMasterOptions {
// still only carry system regions post crash.
assertEquals(masterCount, mNewActualCount);
}
// Disable balancer and wait till RIT done else cluster won't go down.
TEST_UTIL.getAdmin().balancerSwitch(false, true);
while (true) {
if (!TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
isMetaRegionInTransition()) {
break;
}
Threads.sleep(10);
}
} finally {
LOG.info("Running shutdown of cluster");
TEST_UTIL.shutdownMiniCluster();