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