HBASE-21334 TestMergeTableRegionsProcedure is flakey
This commit is contained in:
parent
6dce9cd218
commit
69e65f1bd7
|
@ -510,13 +510,18 @@ public class MasterProcedureTestingUtility {
|
||||||
// Sometimes there are other procedures still executing (including asynchronously spawned by
|
// Sometimes there are other procedures still executing (including asynchronously spawned by
|
||||||
// procId) and due to KillAndToggleBeforeStoreUpdate flag ProcedureExecutor is stopped before
|
// procId) and due to KillAndToggleBeforeStoreUpdate flag ProcedureExecutor is stopped before
|
||||||
// store update. Let all pending procedures finish normally.
|
// store update. Let all pending procedures finish normally.
|
||||||
if (!procExec.isRunning()) {
|
ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false);
|
||||||
LOG.warn("ProcedureExecutor not running, may have been stopped by pending procedure due to"
|
// check 3 times to confirm that the procedure executor has not been killed
|
||||||
+ " KillAndToggleBeforeStoreUpdate flag.");
|
for (int i = 0; i < 3; i++) {
|
||||||
ProcedureTestingUtility.setKillAndToggleBeforeStoreUpdate(procExec, false);
|
if (!procExec.isRunning()) {
|
||||||
restartMasterProcedureExecutor(procExec);
|
LOG.warn("ProcedureExecutor not running, may have been stopped by pending procedure due" +
|
||||||
ProcedureTestingUtility.waitNoProcedureRunning(procExec);
|
" to KillAndToggleBeforeStoreUpdate flag.");
|
||||||
|
restartMasterProcedureExecutor(procExec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Thread.sleep(1000);
|
||||||
}
|
}
|
||||||
|
ProcedureTestingUtility.waitNoProcedureRunning(procExec);
|
||||||
}
|
}
|
||||||
|
|
||||||
assertEquals(true, procExec.isRunning());
|
assertEquals(true, procExec.isRunning());
|
||||||
|
|
Loading…
Reference in New Issue