adoroszlai commented on code in PR #7612:
URL: https://github.com/apache/ozone/pull/7612#discussion_r1905991580


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java:
##########
@@ -666,15 +662,21 @@ public void testScmInfo(@TempDir Path tempDir) throws 
Exception {
         SCMHANodeDetails.loadSCMHAConfig(conf, scmStore)
             .getLocalNodeDetails(), conf);
     StorageContainerManager scm = HddsTestUtils.getScmSimple(conf);
-    scm.start();
-    //Reads the SCM Info from SCM instance
-    ScmInfo scmInfo = scm.getClientProtocolServer().getScmInfo();
-    assertEquals(clusterId, scmInfo.getClusterId());
-    assertEquals(scmId, scmInfo.getScmId());
-
-    String expectedVersion = HddsVersionInfo.HDDS_VERSION_INFO.getVersion();
-    String actualVersion = scm.getSoftwareVersion();
-    assertEquals(expectedVersion, actualVersion);
+    try {
+      scm.start();
+      //Reads the SCM Info from SCM instance
+      ScmInfo scmInfo = scm.getClientProtocolServer().getScmInfo();
+      assertEquals(clusterId, scmInfo.getClusterId());
+      assertEquals(scmId, scmInfo.getScmId());
+
+      String expectedVersion = HddsVersionInfo.HDDS_VERSION_INFO.getVersion();
+      String actualVersion = scm.getSoftwareVersion();
+      assertEquals(expectedVersion, actualVersion);
+    } finally {
+      if (scmStore != null) {
+        scm.stop();

Review Comment:
   How can `scmStore == null` here?



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java:
##########
@@ -755,15 +751,13 @@ protected void initializeScmStorage(SCMStorageConfig 
scmStore)
       //TODO: HDDS-6897
       //Disabling Ratis for only of MiniOzoneClusterImpl.
       //MiniOzoneClusterImpl doesn't work with Ratis enabled SCM

Review Comment:
   Comment seems to be leftover.



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