caroliney14 commented on a change in pull request #2769:
URL: https://github.com/apache/hbase/pull/2769#discussion_r599189205
##########
File path: hbase-server/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
##########
@@ -176,7 +176,7 @@ private void testSanity(final String testName) throws
Exception {
@Test
public void testRegionAssignmentAfterMasterRecoveryDueToZKExpiry() throws
Exception {
MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();
- cluster.startRegionServer();
+ cluster.startRegionServerAndWait(2000);
Review comment:
@bharathv the `waitForServerOnline()` method is specific to
`JVMClusterUtil.RegionServerThread`. I guess to your point, we could replace
`t.waitForServerOnline()` with
`getMaster().getServerManager().getOnlineServersList().contains(t);` inside
`MiniHBaseCluster.startRegionServer`:
```
private JVMClusterUtil.RegionServerThread startRegionServer(Configuration
configuration)
throws IOException {
User rsUser =
HBaseTestingUtility.getDifferentUser(configuration, ".hfs."+index++);
JVMClusterUtil.RegionServerThread t = null;
try {
t = hbaseCluster.addRegionServer(
configuration, hbaseCluster.getRegionServers().size(), rsUser);
t.start();
getMaster().getServerManager().getOnlineServersList().contains(t);
} catch (InterruptedException ie) {
throw new IOException("Interrupted adding regionserver to cluster",
ie);
}
return t;
}
```
would that resolve the issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]