bharathv commented on a change in pull request #2769:
URL: https://github.com/apache/hbase/pull/2769#discussion_r600140667



##########
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:
       Makes sense to me. You need do this only if tryRegionServerReport() is 
successful. It can also return without a successful report if the exception 
thrown is not `YouAreDeadException`. You may need to make that method return a 
boolean that tells the caller if the report was successfully sent.
   
   Another nit: you don't need a separate boolean firstReport
   
   ```
   if (!online.get()) {
     synchronized(online) {
       ....
     }
   }
   ```
   
   Also please undo the test changes along with this change to validate if they 
are passing now.




-- 
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]


Reply via email to