HBASE-21854 Race condition in TestProcedureSkipPersistence
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
parent
c48438fcb0
commit
ebfde02343
|
@ -148,11 +148,11 @@ public class TestProcedureSkipPersistence {
|
||||||
public void test() throws Exception {
|
public void test() throws Exception {
|
||||||
TestProcedure proc = new TestProcedure();
|
TestProcedure proc = new TestProcedure();
|
||||||
long procId = procExecutor.submitProcedure(proc);
|
long procId = procExecutor.submitProcedure(proc);
|
||||||
htu.waitFor(30000, () -> proc.isWaiting());
|
htu.waitFor(30000, () -> proc.isWaiting() && procExecutor.getActiveExecutorCount() == 0);
|
||||||
ProcedureTestingUtility.restart(procExecutor);
|
ProcedureTestingUtility.restart(procExecutor);
|
||||||
htu.waitFor(30000, () -> {
|
htu.waitFor(30000, () -> {
|
||||||
Procedure<?> p = procExecutor.getProcedure(procId);
|
Procedure<?> p = procExecutor.getProcedure(procId);
|
||||||
return p.isWaiting() || p.isFinished();
|
return (p.isWaiting() || p.isFinished()) && procExecutor.getActiveExecutorCount() == 0;
|
||||||
});
|
});
|
||||||
assertFalse(procExecutor.isFinished(procId));
|
assertFalse(procExecutor.isFinished(procId));
|
||||||
ProcedureTestingUtility.restart(procExecutor);
|
ProcedureTestingUtility.restart(procExecutor);
|
||||||
|
|
Loading…
Reference in New Issue