lfxy commented on code in PR #8107:
URL: https://github.com/apache/hadoop/pull/8107#discussion_r2587306793


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java:
##########
@@ -1251,6 +1251,18 @@ public void testAllDatanodesReconfig()
 
     int result = admin.startReconfiguration("datanode", "livenodes");
     assertThat(result).isEqualTo(0);
+    LambdaTestUtils.await(10000, 100, () -> {
+      List<String> outs = new ArrayList<>();
+      List<String> errs = new ArrayList<>();
+      try {
+        getReconfigurationStatus("datanode", "livenodes", outs, errs);
+      } catch (IOException | InterruptedException e) {
+        LOG.error(String.format(
+            "call getReconfigurationStatus on datanode[livenodes] failed."), 
e);
+      }
+      return !outs.isEmpty() && outs.get(0).contains("finished");
+    });
+

Review Comment:
   @ayushtkn Do you agree with this modification? Also, is it possible to 
replace LambdaTestUtils.await() with awaitReconfigurationFinished(), since 
their logic is the same?



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