HBASE-22234 Fix flaky TestHbck#testRecoverSplitAfterMetaUpdated

This commit is contained in:
tianjingyun 2019-04-14 21:59:59 +08:00
parent 01c26c5311
commit cb84b2788a
1 changed files with 3 additions and 3 deletions

View File

@ -253,7 +253,7 @@ public class TestHbck {
Assert.assertEquals(1, result.size());
hbck.assigns(Arrays.asList(result.keySet().toArray(new String[0])).stream()
.map(regionName -> regionName.split("\\.")[1]).collect(Collectors.toList()));
ProcedureTestingUtility.waitNoProcedureRunning(master.getMasterProcedureExecutor());
ProcedureTestingUtility.waitAllProcedures(master.getMasterProcedureExecutor());
// now the state should be fixed
result = hbck.getFailedSplitMergeLegacyRegions(Arrays.asList(TableName.valueOf(testTable)));
Assert.assertEquals(0, result.size());
@ -290,7 +290,7 @@ public class TestHbck {
Assert.assertEquals(2, result.size());
hbck.assigns(Arrays.asList(result.keySet().toArray(new String[0])).stream()
.map(regionName -> regionName.split("\\.")[1]).collect(Collectors.toList()));
ProcedureTestingUtility.waitNoProcedureRunning(master.getMasterProcedureExecutor());
ProcedureTestingUtility.waitAllProcedures(master.getMasterProcedureExecutor());
// now the state should be fixed
result = hbck.getFailedSplitMergeLegacyRegions(Arrays.asList(TableName.valueOf(testTable)));
Assert.assertEquals(0, result.size());
@ -310,7 +310,7 @@ public class TestHbck {
Assert.assertEquals(2, result.size());
hbck.assigns(Arrays.asList(result.keySet().toArray(new String[0])).stream()
.map(regionName -> regionName.split("\\.")[1]).collect(Collectors.toList()));
ProcedureTestingUtility.waitNoProcedureRunning(master.getMasterProcedureExecutor());
ProcedureTestingUtility.waitAllProcedures(master.getMasterProcedureExecutor());
// now the state should be fixed
result = hbck.getFailedSplitMergeLegacyRegions(Arrays.asList(TableName.valueOf(testTable)));
Assert.assertEquals(0, result.size());