diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/locking/TestEntityLocks.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/locking/TestEntityLocks.java index 904c36dfc82..4ac3654203f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/locking/TestEntityLocks.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/locking/TestEntityLocks.java @@ -192,6 +192,9 @@ public class TestEntityLocks { lock.requestLock(); lock.await(); assertTrue(waitLockTimeOut(lock, 100 * workerSleepTime)); + while (lock.getWorker().isAlive()) { + TimeUnit.MILLISECONDS.sleep(100); + } verify(abortable, times(1)).abort(any(), isA(HBaseIOException.class)); assertFalse(lock.getWorker().isAlive()); }