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


##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java:
##########
@@ -1249,8 +1249,15 @@ public void testAllDatanodesReconfig()
     when(reconfigurationUtil.parseChangedProperties(any(Configuration.class),
         any(Configuration.class))).thenReturn(changes);
 
-    int result = admin.startReconfiguration("datanode", "livenodes");
-    assertThat(result).isEqualTo(0);
+    LambdaTestUtils.await(1000, 50, () -> {
+      int result = admin.startReconfiguration("datanode", "livenodes");
+      assertThat(result).isEqualTo(0);
+      final List<String> outs = new ArrayList<>();
+      final List<String> errs = new ArrayList<>();
+      awaitReconfigurationFinished("datanode", "livenodes", outs, errs);
+      return errs.isEmpty();
+    });
+

Review Comment:
   in this logic we are doing `` admin.startReconfiguration("datanode", 
"livenodes");`` like in every iteration, we should just wait for the result and 
not perform any action, that changes the flow of the test



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