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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestOmSCMNodesReconfiguration.java:
##########
@@ -109,11 +131,8 @@ void testScmNodesAndAddressReconfigurableOnOm() throws 
Exception {
   void testReconfigureScmNodesToBlankThrows() {
     ReconfigurationHandler handler =
         cluster.getOzoneManager().getReconfigurationHandler();
-    String scmNodesKey =
-        ConfUtils.addKeySuffixes(OZONE_SCM_NODES_KEY, scmServiceId);
-
     assertThrows(ReconfigurationException.class,
-        () -> handler.reconfigureProperty(scmNodesKey, ""));
+        () -> handler.reconfigureProperty(scmNodesConfigKey, ""));

Review Comment:
   To reduce change, I suggest renaming `scmNodesConfigKey` to `scmNodesKey`.



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestOmSCMNodesReconfiguration.java:
##########
@@ -72,10 +76,31 @@ public void init() throws Exception {
         .setNumOfOzoneManagers(1)
         .build();
     cluster.waitForClusterToBeReady();
+
+    scmNodesConfigKey =
+        ConfUtils.addKeySuffixes(OZONE_SCM_NODES_KEY, scmServiceId);

Review Comment:
   nit: no need to wrap



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestOmSCMNodesReconfiguration.java:
##########
@@ -58,11 +59,14 @@
 @Timeout(300)
 public class TestOmSCMNodesReconfiguration {
 
-  private MiniOzoneHAClusterImpl cluster = null;
-  private String scmServiceId;
+  private static MiniOzoneHAClusterImpl cluster;
+  private static String scmServiceId;
+  private static String scmNodesConfigKey;
+  private static String initialScmNodes;
+  private static final Map<String, String> INITIAL_SCM_ADDRESSES = new 
HashMap<>();
 
-  @BeforeEach
-  public void init() throws Exception {
+  @BeforeAll
+  public static void init() throws Exception {

Review Comment:
   Also to reduce change, I prefer to add 
   
   
https://github.com/apache/ozone/blob/7b8ace09aa8d82fdfaf4f531e4ab20762d3f5685/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestLeaseRecovery.java#L94
   
   which allows `@BeforeAll`/`@AfterAll` to be non-`static`.  Then we can also 
keep `cluster` non-`static`.



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