HDFS-17422. Enhance the stability of the unit test TestDFSAdmin (#6621). Contributed by lei w and Hualong Zhang.
Signed-off-by: He Xiaoqiao <hexiaoqiao@apache.org>
This commit is contained in:
parent
bb32aec88e
commit
dbf08c872a
@ -1353,8 +1353,14 @@ public void testDecommissionDataNodesReconfig()
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user