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 2015/10/21 18:53:34 UTC

hbase git commit: HBASE-14427 Fix 'should' assertions in TestFastFail (Abhishek Singh Chouhan)

Repository: hbase
Updated Branches:
  refs/heads/master 6e3b7af0e -> b3afdb8de


HBASE-14427 Fix 'should' assertions in TestFastFail (Abhishek Singh Chouhan)


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

Branch: refs/heads/master
Commit: b3afdb8de1a9fa88c553159b2d2d2aa96902a345
Parents: 6e3b7af
Author: stack <st...@apache.org>
Authored: Wed Oct 21 09:53:27 2015 -0700
Committer: stack <st...@apache.org>
Committed: Wed Oct 21 09:53:27 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/client/TestFastFail.java   | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b3afdb8d/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
index 204c4a4..3ce7afb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
@@ -60,7 +60,7 @@ public class TestFastFail {
   private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
   private static byte[] FAMILY = Bytes.toBytes("testFamily");
   private static final Random random = new Random();
-  private static int SLAVES = 3;
+  private static int SLAVES = 1;
   private static byte[] QUALIFIER = Bytes.toBytes("testQualifier");
   private static final int SLEEPTIME = 5000;
 
@@ -217,8 +217,6 @@ public class TestFastFail {
 
     doneHalfway.await();
 
-    ClusterStatus status = TEST_UTIL.getHBaseCluster().getClusterStatus();
-
     // Kill a regionserver
     TEST_UTIL.getHBaseCluster().getRegionServer(0).getRpcServer().stop();
     TEST_UTIL.getHBaseCluster().getRegionServer(0).stop("Testing");
@@ -227,8 +225,8 @@ public class TestFastFail {
     continueOtherHalf.countDown();
 
     Thread.sleep(2 * SLEEPTIME);
-    // Restore the cluster
-    TEST_UTIL.getHBaseCluster().restoreClusterStatus(status);
+    // Start a RS in the cluster
+    TEST_UTIL.getHBaseCluster().startRegionServer();
 
     int numThreadsReturnedFalse = 0;
     int numThreadsReturnedTrue = 0;
@@ -269,19 +267,16 @@ public class TestFastFail {
     assertEquals("The regionservers that returned true should equal to the"
         + " number of successful threads", numThreadsReturnedTrue,
         numSuccessfullThreads.get());
-    /* 'should' is not worthy of an assert. Disabling because randomly this seems to randomly
-     * not but true. St.Ack 20151012
-     *
     assertTrue(
-        "There should be atleast one thread that retried instead of failing",
+        "There will be atleast one thread that retried instead of failing",
         MyPreemptiveFastFailInterceptor.numBraveSouls.get() > 0);
     assertTrue(
-        "There should be atleast one PreemptiveFastFail exception,"
+        "There will be atleast one PreemptiveFastFail exception,"
             + " otherwise, the test makes little sense."
             + "numPreemptiveFastFailExceptions: "
             + numPreemptiveFastFailExceptions.get(),
         numPreemptiveFastFailExceptions.get() > 0);
-    */
+    
     assertTrue(
         "Only few thread should ideally be waiting for the dead "
             + "regionserver to be coming back. numBlockedWorkers:"