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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManagerHA.java:
##########
@@ -72,6 +77,8 @@
 @Timeout(300)
 public class TestStorageContainerManagerHA {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(TestMiniOzoneCluster.class);

Review Comment:
   Done



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManagerHA.java:
##########
@@ -323,4 +335,75 @@ private void waitForLeaderToBeReady()
     }, 1000, (int) ScmConfigKeys
         .OZONE_SCM_HA_RATIS_LEADER_READY_WAIT_TIMEOUT_DEFAULT);
   }
+
+  @Test
+  public void testSCMLeadershipMetric() throws IOException, 
InterruptedException {
+    // GIVEN
+    int scmInstancesCount = 3;
+    conf = new OzoneConfiguration();
+    MiniOzoneCluster.Builder haMiniClusterBuilder = 
MiniOzoneCluster.newHABuilder(conf)
+        .setSCMServiceId("scm-service-id")
+        .setOMServiceId("om-service-id")
+        .setNumOfActiveOMs(0)
+        .setNumOfStorageContainerManagers(scmInstancesCount)
+        .setNumOfActiveSCMs(1)
+        .setNumDatanodes(0);
+
+    // start single SCM instance without other Ozone services
+    // in order to initialize and bootstrap SCM instances only
+    cluster = (MiniOzoneHAClusterImpl) haMiniClusterBuilder.build();
+
+    List<StorageContainerManager> storageContainerManagersList =
+        ((MiniOzoneHAClusterImpl) cluster).getStorageContainerManagersList();

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