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 39e70adb7f77..5a2a8939826c 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 @@ -175,7 +175,10 @@ public void testEntityLockTimeout() throws Exception { assertTrue(lock.isLocked()); // Should get unlocked in next heartbeat i.e. after workerSleepTime. Wait 10x time to be sure. assertTrue(waitLockTimeOut(lock, 10 * workerSleepTime)); - assertFalse(lock.getWorker().isAlive()); + + // Works' run() returns, there is a small gap that the thread is still alive(os + // has not declare it is dead yet), so remove the following assertion. + // assertFalse(lock.getWorker().isAlive()); verify(abortable, times(1)).abort(any(), eq(null)); }