You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2019/02/11 13:57:19 UTC
[hbase] branch branch-2.2 updated: HBASE-21854 Race condition in
TestProcedureSkipPersistence
This is an automated email from the ASF dual-hosted git repository.
psomogyi pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new 73385e6 HBASE-21854 Race condition in TestProcedureSkipPersistence
73385e6 is described below
commit 73385e6138933bbef7ecae47cbaeaff9e28faa8e
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);