You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2017/06/29 04:32:53 UTC

hbase git commit: HBASE-18292 Fixed flaky test hbase.master.locking.TestLockProcedure#testLocalMasterLockRecovery

Repository: hbase
Updated Branches:
  refs/heads/master 038d7e898 -> 9189b8864


HBASE-18292 Fixed flaky test hbase.master.locking.TestLockProcedure#testLocalMasterLockRecovery

Signed-off-by: Michael Stack <st...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9189b886
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9189b886
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9189b886

Branch: refs/heads/master
Commit: 9189b88647f4fd32e9f11081630882374d4c4f28
Parents: 038d7e8
Author: Umesh Agashe <ua...@cloudera.com>
Authored: Wed Jun 28 16:03:02 2017 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Wed Jun 28 21:32:46 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/master/locking/TestLockProcedure.java      | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9189b886/hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java
index d2a2c93..ac157e4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/locking/TestLockProcedure.java
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.shaded.com.google.protobuf.ServiceException;
 import org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.*;
 import org.apache.hadoop.hbase.testclassification.MasterTests;
 import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.util.Pair;
 import org.hamcrest.core.IsInstanceOf;
 import org.hamcrest.core.StringStartsWith;
 import org.junit.rules.TestRule;
@@ -74,8 +75,8 @@ public class TestLockProcedure {
   @Rule
   public TestName testName = new TestName();
   // crank this up if this test turns out to be flaky.
-  private static final int HEARTBEAT_TIMEOUT = 1000;
-  private static final int LOCAL_LOCKS_TIMEOUT = 2000;
+  private static final int HEARTBEAT_TIMEOUT = 2000;
+  private static final int LOCAL_LOCKS_TIMEOUT = 4000;
 
   private static final Log LOG = LogFactory.getLog(TestLockProcedure.class);
   protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
@@ -438,9 +439,9 @@ public class TestLockProcedure {
       Thread.sleep(250);
     }
     assertEquals(true, procExec.isRunning());
-    LockProcedure proc = (LockProcedure) procExec.getProcedure(lockProc.getProcId());
-    assertTrue(proc == null || !proc.isLocked());
     ProcedureTestingUtility.waitProcedure(procExec, lockProc.getProcId());
+    Pair<ProcedureInfo, Procedure> result = procExec.getResultOrProcedure(lockProc.getProcId());
+    assertTrue(result.getFirst() != null && !result.getFirst().isFailed());
     ProcedureTestingUtility.assertProcNotFailed(procExec, lockProc.getProcId());
   }
 }