hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-Fix client.TestClientClusterStatus (Chia-Ping Tsai)
Date Mon, 21 Aug 2017 21:22:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 430e3e360 -> 99e18fed2


HBASE-Fix client.TestClientClusterStatus (Chia-Ping Tsai)


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

Branch: refs/heads/branch-2
Commit: 99e18fed23a2a476514fa4bd500b07a8d913e330
Parents: 430e3e3
Author: Michael Stack <stack@apache.org>
Authored: Mon Aug 21 14:21:30 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Mon Aug 21 14:21:55 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/client/TestClientClusterStatus.java      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/99e18fed/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientClusterStatus.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientClusterStatus.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientClusterStatus.java
index 49b4ff2..484ee06 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientClusterStatus.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientClusterStatus.java
@@ -65,7 +65,7 @@ public class TestClientClusterStatus {
     RegionServerThread rst = rsts.get(rsts.size() - 1);
     DEAD = rst.getRegionServer();
     DEAD.stop("Test dead servers status");
-    while (!DEAD.isStopped()) {
+    while (rst.isAlive()) {
       Thread.sleep(500);
     }
   }
@@ -155,9 +155,11 @@ public class TestClientClusterStatus {
     Assert.assertNotNull(status);
     Assert.assertNotNull(status.getServers());
     // exclude a dead region server
-    Assert.assertEquals(SLAVES, numRs);
-    // live servers = primary master + nums of regionservers
-    Assert.assertEquals(status.getServers().size() + 1 /*Master*/, numRs);
+    Assert.assertEquals(SLAVES -1, numRs);
+    // live servers = nums of regionservers
+    // By default, HMaster don't carry any regions so it won't report its load.
+    // Hence, it won't be in the server list.
+    Assert.assertEquals(status.getServers().size(), numRs);
     Assert.assertTrue(status.getRegionsCount() > 0);
     Assert.assertNotNull(status.getDeadServerNames());
     Assert.assertEquals(1, status.getDeadServersSize());


Mime
View raw message