vtutrinov commented on code in PR #7471:
URL: https://github.com/apache/ozone/pull/7471#discussion_r1861570782


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java:
##########
@@ -584,19 +586,29 @@ protected SCMHAService createSCMService()
             }
             scmList.add(scm);
 
-            if (i <= numOfActiveSCMs) {
-              scm.start();
-              activeSCMs.add(scm);
-              LOG.info("Started SCM RPC server at {}",
-                  scm.getClientRpcAddress());
-            } else {
-              inactiveSCMs.add(scm);
-              LOG.info("Intialized SCM at {}. This SCM is currently "
-                  + "inactive (not running).", scm.getClientRpcAddress());
-            }
+            int scmCounter = i;
+            new Thread(() -> {
+              if (scmCounter <= numOfActiveSCMs) {
+                try {
+                  scm.start();
+                } catch (IOException e) {
+                  scmStartCounter.countDown();
+                  throw new RuntimeException(e);
+                }
+                activeSCMs.add(scm);
+                LOG.info("Started SCM RPC server at {}",
+                    scm.getClientRpcAddress());
+              } else {
+                inactiveSCMs.add(scm);
+                LOG.info("Initialized SCM at {}. This SCM is currently "
+                    + "inactive (not running).", scm.getClientRpcAddress());
+              }
+              scmStartCounter.countDown();
+            }).start();

Review Comment:
   Done
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to