slfan1989 commented on code in PR #7934:
URL: https://github.com/apache/hadoop/pull/7934#discussion_r2328416516


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java:
##########
@@ -1194,21 +1199,25 @@ void testBalancer1Internal(Configuration conf) throws 
Exception {
         new String[]{RACK0, RACK1});
   }
 
-  @Test(expected=HadoopIllegalArgumentException.class)
+  @Test
   public void testBalancerWithZeroThreadsForMove() throws Exception {
-    Configuration conf = new HdfsConfiguration();
-    
conf.setInt(DFSConfigKeys.DFS_DATANODE_BALANCE_MAX_NUM_CONCURRENT_MOVES_KEY, 0);
-    testBalancer1Internal (conf);
+    Assertions.assertThrows(HadoopIllegalArgumentException.class, () -> {

Review Comment:
   It is best to use static imports.
   



##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java:
##########
@@ -1448,14 +1459,15 @@ public void testBalancerDispatchHotBlockTimeInterval() {
       Object hotBlockTimeInterval = field1.get(dispatcher);
       assertEquals(1000, (long)hotBlockTimeInterval);
     } catch (Exception e) {
-      Assert.fail(e.getMessage());
+      Assertions.fail(e.getMessage());

Review Comment:
   It is best to use static imports.
   



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