hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1445868 - in /hbase/branches/hbase-7290/hbase-server/src: main/java/org/apache/hadoop/hbase/procedure/Procedure.java test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java
Date Wed, 13 Feb 2013 19:14:44 GMT
Author: jmhsieh
Date: Wed Feb 13 19:14:43 2013
New Revision: 1445868

URL: http://svn.apache.org/r1445868
Log:
HBASE-7633 Fix flakey TestZKProcedure.testMultiCohortWithMemberTimeoutDuringPrepare


Modified:
    hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
    hbase/branches/hbase-7290/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java

Modified: hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java?rev=1445868&r1=1445867&r2=1445868&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
(original)
+++ hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Procedure.java
Wed Feb 13 19:14:43 2013
@@ -334,7 +334,9 @@ public class Procedure implements Callab
   }
 
   /**
-   * Waits until the entire procedure has globally completed, or has been aborted.
+   * Waits until the entire procedure has globally completed, or has been aborted.  If an
+   * exception is thrown the procedure may or not have run cleanup to trigger the completion
latch
+   * yet.
    * @throws ForeignException
    * @throws InterruptedException
    */

Modified: hbase/branches/hbase-7290/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java?rev=1445868&r1=1445867&r2=1445868&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java
(original)
+++ hbase/branches/hbase-7290/hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestZKProcedure.java
Wed Feb 13 19:14:43 2013
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEqu
 import static org.mockito.Matchers.any;
 import static org.mockito.Matchers.anyListOf;
 import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.atMost;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.when;
@@ -316,7 +317,10 @@ public class TestZKProcedure {
     // -------------
     // verification
     // -------------
-    waitAndVerifyProc(coordinatorTask, once, never(), once, once, true);
+
+    // always expect prepared, never committed, and possible to have cleanup and finish (racy
since
+    // error case)
+    waitAndVerifyProc(coordinatorTask, once, never(), once, atMost(1), true);
     verifyCohortSuccessful(expected, subprocFactory, cohortTasks, once, never(), once,
       once, true);
 



Mime
View raw message