sarvekshayr commented on code in PR #9812:
URL: https://github.com/apache/ozone/pull/9812#discussion_r2844976654


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancerTask.java:
##########
@@ -411,6 +411,33 @@ public void balancerShouldMoveOnlyPositiveSizeContainers()
     assertFalse(zeroOrNegSizeContainerMoved);
   }
 
+  @Test
+  public void testStartBalancerWithInvalidNodes() {
+    ContainerBalancer balancer = new ContainerBalancer(scm);
+    ContainerBalancerConfiguration cbConf =
+        conf.getObject(ContainerBalancerConfiguration.class);
+
+    // Testing if invalid hostname throws an exception
+    cbConf.setIncludeNodes("invalid-host-name");
+    org.junit.jupiter.api.Assertions.assertThrows(

Review Comment:
   Please add the imports for `assertThrows` and `assertDoesNotThrow` at the 
top of the file (referenced at lines 422, 429, and 437).
   
   Also, consider reducing the length of this test case by removing unnecessary 
multi-line formatting wherever the statements fit within the standard line 
length limits.



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