From 5e11ff100a2d2161be7d69c3db75974bb21641ea Mon Sep 17 00:00:00 2001 From: huaxiangsun Date: Fri, 10 Apr 2020 09:40:50 -0700 Subject: [PATCH] HBASE-24161 [flakey test] locking.TestEntityLocks.testEntityLockTimeout (#1477) (#1481) Signed-off-by: stack --- .../apache/hadoop/hbase/client/locking/TestEntityLocks.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 39e70adb7f7..5a2a8939826 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 class TestEntityLocks { 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)); }