HBASE-24428 : Fix for testSplitCompactWithPriority (ADDENDUM)

This commit is contained in:
Viraj Jasani 2020-05-29 18:05:02 +05:30
parent 7b7e25a50b
commit bf869def43
No known key found for this signature in database
GPG Key ID: 3AE697641452FC5D
1 changed files with 6 additions and 2 deletions

View File

@ -324,8 +324,10 @@ public class TestSplitTransactionOnCluster {
// the procedure will return true; if the split fails, the procedure would throw exception.
ProcedureTestingUtility.waitProcedure(cluster.getMaster().getMasterProcedureExecutor(),
procId);
assertEquals(2, cluster.getRegions(tableName).size());
Thread.sleep(3000);
assertNotEquals("Table is not split properly?", -1,
TESTING_UTIL.waitFor(3000,
() -> cluster.getRegions(tableName).size() == 2));
// we have 2 daughter regions
HRegion hRegion1 = cluster.getRegions(tableName).get(0);
HRegion hRegion2 = cluster.getRegions(tableName).get(1);
@ -357,6 +359,8 @@ public class TestSplitTransactionOnCluster {
// be accepted.
assertTrue(compactionContext.get().getRequest().isAfterSplit());
assertEquals(compactionContext.get().getRequest().getPriority(), Integer.MIN_VALUE + 10);
admin.disableTable(tableName);
admin.deleteTable(tableName);
}
public static class FailingSplitMasterObserver implements MasterCoprocessor, MasterObserver {