amaliujia commented on a change in pull request #1738:
URL: https://github.com/apache/ozone/pull/1738#discussion_r549573175



##########
File path: 
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/TestUtils.java
##########
@@ -475,7 +475,6 @@ public static void quasiCloseContainer(ContainerManagerV2 
containerManager,
   public static StorageContainerManager getScmSimple(OzoneConfiguration conf)
       throws IOException, AuthenticationException {
     SCMConfigurator configurator = new SCMConfigurator();
-    configurator.setSCMHAManager(MockSCMHAManager.getInstance(true));

Review comment:
       You will need this line: 
   `conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);`
   
   `SCMHAManagerImpl` will return isLeader immediately without enabling this HA:
   
   ```
       if (!SCMHAUtils.isSCMHAEnabled(conf)) {
         // When SCM HA is not enabled, the current SCM is always the leader.
         return Optional.of((long)0);
       }
   ```




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



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

Reply via email to