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

Revert because bad commit message.

This reverts commit 99e18fed23.
This commit is contained in:
Michael Stack 2017-08-21 14:40:03 -07:00
parent 99e18fed23
commit 7a16acc881
1 changed files with 4 additions and 6 deletions

View File

@ -65,7 +65,7 @@ public class TestClientClusterStatus {
RegionServerThread rst = rsts.get(rsts.size() - 1); RegionServerThread rst = rsts.get(rsts.size() - 1);
DEAD = rst.getRegionServer(); DEAD = rst.getRegionServer();
DEAD.stop("Test dead servers status"); DEAD.stop("Test dead servers status");
while (rst.isAlive()) { while (!DEAD.isStopped()) {
Thread.sleep(500); Thread.sleep(500);
} }
} }
@ -155,11 +155,9 @@ public class TestClientClusterStatus {
Assert.assertNotNull(status); Assert.assertNotNull(status);
Assert.assertNotNull(status.getServers()); Assert.assertNotNull(status.getServers());
// exclude a dead region server // exclude a dead region server
Assert.assertEquals(SLAVES -1, numRs); Assert.assertEquals(SLAVES, numRs);
// live servers = nums of regionservers // live servers = primary master + nums of regionservers
// By default, HMaster don't carry any regions so it won't report its load. Assert.assertEquals(status.getServers().size() + 1 /*Master*/, numRs);
// Hence, it won't be in the server list.
Assert.assertEquals(status.getServers().size(), numRs);
Assert.assertTrue(status.getRegionsCount() > 0); Assert.assertTrue(status.getRegionsCount() > 0);
Assert.assertNotNull(status.getDeadServerNames()); Assert.assertNotNull(status.getDeadServerNames());
Assert.assertEquals(1, status.getDeadServersSize()); Assert.assertEquals(1, status.getDeadServersSize());