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 2019/02/12 16:07:57 UTC

[hbase] branch branch-2.0 updated: HBASE-21854 Race condition in TestProcedureSkipPersistence

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 483f96f  HBASE-21854 Race condition in TestProcedureSkipPersistence
483f96f is described below

commit 483f96f8f0608d90a19e474d0e74c81d5c0ec418
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Mon Feb 11 16:33:14 2019 +0800

    HBASE-21854 Race condition in TestProcedureSkipPersistence
    
    Signed-off-by: Peter Somogyi <ps...@apache.org>
---
 .../apache/hadoop/hbase/procedure2/TestProcedureSkipPersistence.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSkipPersistence.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSkipPersistence.java
index 8293dcb..2ddc732 100644
--- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSkipPersistence.java
+++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSkipPersistence.java
@@ -148,11 +148,11 @@ public class TestProcedureSkipPersistence {
   public void test() throws Exception {
     TestProcedure proc = new TestProcedure();
     long procId = procExecutor.submitProcedure(proc);
-    htu.waitFor(30000, () -> proc.isWaiting());
+    htu.waitFor(30000, () -> proc.isWaiting() && procExecutor.getActiveExecutorCount() == 0);
     ProcedureTestingUtility.restart(procExecutor);
     htu.waitFor(30000, () -> {
       Procedure<?> p = procExecutor.getProcedure(procId);
-      return p.isWaiting() || p.isFinished();
+      return (p.isWaiting() || p.isFinished()) && procExecutor.getActiveExecutorCount() == 0;
     });
     assertFalse(procExecutor.isFinished(procId));
     ProcedureTestingUtility.restart(procExecutor);