You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sl...@apache.org on 2024/03/22 23:32:28 UTC
(hadoop) branch HDFS-17384 updated: HDFS-17422. Enhance the stability of the unit test TestDFSAdmin (#6621). Contributed by lei w and Hualong Zhang. (#6657)
This is an automated email from the ASF dual-hosted git repository.
slfan1989 pushed a commit to branch HDFS-17384
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/HDFS-17384 by this push:
new 8a3eeca112f9 HDFS-17422. Enhance the stability of the unit test TestDFSAdmin (#6621). Contributed by lei w and Hualong Zhang. (#6657)
8a3eeca112f9 is described below
commit 8a3eeca112f9286c0dad40de07ae54ee0b632c95
Author: ZanderXu <za...@apache.org>
AuthorDate: Sat Mar 23 07:32:21 2024 +0800
HDFS-17422. Enhance the stability of the unit test TestDFSAdmin (#6621). Contributed by lei w and Hualong Zhang. (#6657)
Reviewed-by: Dinesh Chitlangia <di...@apache.org>
Signed-off-by: Shilun Fan <sl...@apache.org>
---
.../test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
index 451a419aa140..392866e86ea2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java
@@ -1353,8 +1353,14 @@ public class TestDFSAdmin {
decommissioningNode1.getIpcPort();
String node2Addr = decommissioningNode2.getIpAddr() + ":" +
decommissioningNode2.getIpcPort();
- assertTrue(outsForFinishReconf.get(0).contains(node1Addr)
- && outsForFinishReconf.get(0).contains(node2Addr));
+ int finishedReconfCount = 0;
+ for (String outMessage : outsForFinishReconf) {
+ finishedReconfCount = outMessage.contains(node1Addr) ?
+ finishedReconfCount + 1 : finishedReconfCount + 0;
+ finishedReconfCount = outMessage.contains(node2Addr) ?
+ finishedReconfCount + 1 : finishedReconfCount + 0;
+ }
+ assertTrue(finishedReconfCount == 2);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org