HDFS-13557. TestDFSAdmin#testListOpenFiles fails on Windows. Contributed by Anbang Hu.

This commit is contained in:
Inigo Goiri 2018-05-16 09:33:16 -07:00
parent 19cf706711
commit d163f72310
1 changed files with 4 additions and 2 deletions

View File

@ -658,10 +658,12 @@ public class TestDFSAdmin {
final String outStr = scanIntoString(out);
LOG.info("dfsadmin -listOpenFiles output: \n" + out);
for (Path closedFilePath : closedFileSet) {
assertThat(outStr, not(containsString(closedFilePath.toString() + "\n")));
assertThat(outStr, not(containsString(closedFilePath.toString() +
System.lineSeparator())));
}
for (Path openFilePath : openFilesMap.keySet()) {
assertThat(outStr, is(containsString(openFilePath.toString() + "\n")));
assertThat(outStr, is(containsString(openFilePath.toString() +
System.lineSeparator())));
}
}