HDFS-17448. Enhance the stability of the unit test TestDiskBalancerCommand (#6690). Contributed by Haiyang Hu
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
06db6289cb
commit
4807815e1c
@ -834,8 +834,13 @@ public void testDiskBalancerQueryWithoutSubmitAndMultipleNodes() throws Exceptio
|
||||
.getIpcPort(), dataNode2.getIpcPort());
|
||||
final String cmdLine = String.format("hdfs diskbalancer %s", queryArg);
|
||||
List<String> outputs = runCommand(cmdLine);
|
||||
assertThat(outputs.get(1), containsString("localhost:" + dataNode1.getIpcPort()));
|
||||
assertThat(outputs.get(6), containsString("localhost:" + dataNode2.getIpcPort()));
|
||||
assertEquals(12, outputs.size());
|
||||
assertTrue("Expected outputs: " + outputs,
|
||||
outputs.get(1).contains("localhost:" + dataNode1.getIpcPort()) ||
|
||||
outputs.get(6).contains("localhost:" + dataNode1.getIpcPort()));
|
||||
assertTrue("Expected outputs: " + outputs,
|
||||
outputs.get(1).contains("localhost:" + dataNode2.getIpcPort()) ||
|
||||
outputs.get(6).contains("localhost:" + dataNode2.getIpcPort()));
|
||||
} finally {
|
||||
miniDFSCluster.shutdown();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user