HBASE-22652 Flakey TestLockManager; test timed out after 780 seconds

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
stack 2019-07-02 20:33:50 -07:00
parent 35521d4a2f
commit 352184f16b
1 changed files with 4 additions and 1 deletions

View File

@ -78,7 +78,10 @@ class TimeoutExecutorThread<TEnvironment> extends StoppableThread {
}
public void add(Procedure<TEnvironment> procedure) {
assert procedure.getState() == ProcedureState.WAITING_TIMEOUT;
// On the assert, we expect WAITING_TIMEOUT but timing could make it so lock gets released by
// time we get here and in those cases the state could be back to RUNNABLE. Let it
assert procedure.getState() == ProcedureState.WAITING_TIMEOUT ||
procedure.getState() == ProcedureState.RUNNABLE;
LOG.info("ADDED {}; timeout={}, timestamp={}", procedure, procedure.getTimeout(),
procedure.getTimeoutTimestamp());
queue.add(new DelayedProcedure<>(procedure));