From commits-return-79900-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Thu Oct 25 23:59:37 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0087D180670 for ; Thu, 25 Oct 2018 23:59:36 +0200 (CEST) Received: (qmail 96539 invoked by uid 500); 25 Oct 2018 21:59:36 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 96525 invoked by uid 99); 25 Oct 2018 21:59:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2018 21:59:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9E108E08ED; Thu, 25 Oct 2018 21:59:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@hbase.apache.org Message-Id: <36bf140aecc8437bb7117489c1222625@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: hbase git commit: HBASE-21344 Fix TestMetaShutdownHandler (addendum) Date: Thu, 25 Oct 2018 21:59:35 +0000 (UTC) Repository: hbase Updated Branches: refs/heads/branch-2.0 85ee79904 -> 8440de62a HBASE-21344 Fix TestMetaShutdownHandler (addendum) Signed-off-by: Josh Elser Signed-off-by: Michael Stack 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 Authored: Thu Oct 25 17:48:34 2018 -0400 Committer: Josh Elser 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() { @Override public boolean evaluate() throws Exception {