vli02 commented on a change in pull request #3308:
URL: https://github.com/apache/hbase/pull/3308#discussion_r641628429



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java
##########
@@ -67,13 +71,14 @@ public void testClusterPortAssignment() throws Exception {
         assertEquals("RS info port is incorrect", rsInfoPort,
           cluster.getRegionServer(0).getInfoServer().getPort());
       } catch (Exception e) {
-        if (e instanceof  BindException || e.getCause() != null &&
-            (e.getCause() instanceof BindException || e.getCause().getCause() 
!= null &&
-              e.getCause().getCause() instanceof BindException)) {
+        Throwable rootCause = ExceptionUtils.getRootCause(e);
+        if (rootCause instanceof BindException) {
           LOG.info("Failed bind, need to retry", e);
           retry = true;
         } else {
-          throw e;
+          LOG.info("Failed to start mini cluster", e);

Review comment:
       good catch, fixed.




-- 
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:
us...@infra.apache.org


Reply via email to