[
https://issues.apache.org/jira/browse/HDFS-17858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042692#comment-18042692
]
ASF GitHub Bot commented on HDFS-17858:
---------------------------------------
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 The test has pass. Do you agree with this modification? Also, is
it possible to replace LambdaTestUtils.await() with
awaitReconfigurationFinished(), since their logic is the same?
> Fix TestDFSAdmin#testAllDatanodesReconfig fails
> -----------------------------------------------
>
> Key: HDFS-17858
> URL: https://issues.apache.org/jira/browse/HDFS-17858
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Affects Versions: 3.5.0
> Reporter: caozhiqiang
> Assignee: caozhiqiang
> Priority: Major
> Labels: pull-request-available
>
> TestDFSAdmin::testAllDatanodesReconfig() always failed because the last
> startReconfiguration() need some time to finish.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]