HBASE-19237: TestMaster.testMasterOpsWhileSplitting fails

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Yi Liang 2017-11-10 14:43:46 -08:00 committed by tedyu
parent df82abb159
commit 80741e31e8
1 changed files with 5 additions and 7 deletions

View File

@ -107,15 +107,13 @@ public class TestMaster {
// Now trigger a split and stop when the split is in progress
LOG.info("Splitting table");
TEST_UTIL.getAdmin().split(TABLENAME);
LOG.info("Waiting for split result to be about to open");
RegionStates regionStates = m.getAssignmentManager().getRegionStates();
while (regionStates.getRegionsOfTable(TABLENAME).size() <= 1) {
LOG.info("Making sure we can call getTableRegions while opening");
while (tableRegions.size() < 3) {
tableRegions = MetaTableAccessor.getTableRegionsAndLocations(m.getConnection(),
TABLENAME, false);
Thread.sleep(100);
}
LOG.info("Making sure we can call getTableRegions while opening");
tableRegions = MetaTableAccessor.getTableRegionsAndLocations(m.getConnection(),
TABLENAME, false);
LOG.info("Regions: " + Joiner.on(',').join(tableRegions));
// We have three regions because one is split-in-progress
assertEquals(3, tableRegions.size());