hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject hbase git commit: HBASE-21344 Fix TestMetaShutdownHandler (addendum)
Date Thu, 25 Oct 2018 21:59:35 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2.0 85ee79904 -> 8440de62a


HBASE-21344 Fix TestMetaShutdownHandler (addendum)

Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/branch-2.0
Commit: 8440de62ac6a9f30cceb0d48c4752b7792adedf0
Parents: 85ee799
Author: Ankit Singhal <ankitsinghal59@gmail.com>
Authored: Thu Oct 25 17:48:34 2018 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Oct 25 17:57:10 2018 -0400

----------------------------------------------------------------------
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java | 6 +++++-
 .../apache/hadoop/hbase/master/TestMetaShutdownHandler.java    | 5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8440de62/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 4c8b641..a486ed9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -2658,7 +2658,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
     decrementMinRegionServerCount();
   }
 
-  private void decrementMinRegionServerCount() {
+  /*
+   * Doesn't need to be called when using expireRegionServerSession as it will automatically
+   * decrement the min count
+   */
+  public void decrementMinRegionServerCount() {
     // decrement the count for this.conf, for newly spwaned master
     // this.hbaseCluster shares this configuration too
     decrementMinRegionServerCount(getConfiguration());

http://git-wip-us.apache.org/repos/asf/hbase/blob/8440de62/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
index 5c452ff..2a1db8d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMetaShutdownHandler.java
@@ -61,7 +61,7 @@ public class TestMetaShutdownHandler {
 
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
-    TEST_UTIL.startMiniCluster(2, 3, null, null, MyRegionServer.class);
+    TEST_UTIL.startMiniCluster(2, 4, null, null, MyRegionServer.class);
   }
 
   @AfterClass
@@ -105,6 +105,7 @@ public class TestMetaShutdownHandler {
     String rsEphemeralNodePath =
         ZNodePaths.joinZNode(master.getZooKeeper().znodePaths.rsZNode, metaServerName.toString());
     ZKUtil.deleteNode(master.getZooKeeper(), rsEphemeralNodePath);
+    TEST_UTIL.decrementMinRegionServerCount();
     LOG.info("Deleted the znode for the RegionServer hosting hbase:meta; waiting on SSH");
     // Wait for SSH to finish
     final ServerManager serverManager = master.getServerManager();
@@ -160,7 +161,7 @@ public class TestMetaShutdownHandler {
     master.abort("Abort to test whether standby assign the meta OPENING region");
     AssignmentTestingUtil.killRs(TEST_UTIL, metaServerName);
     final HMaster oldMaster = master;
-    TEST_UTIL.decrementMinRegionServerCount(conf);
+    TEST_UTIL.decrementMinRegionServerCount();
     TEST_UTIL.waitFor(120000, 200, new Waiter.Predicate<Exception>() {
       @Override
       public boolean evaluate() throws Exception {


Mime
View raw message