소스 검색

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

Inigo Goiri 7 년 전
부모
커밋
6b67161ca3
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java

+ 4 - 2
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java

@@ -813,12 +813,14 @@ public class TestDFSAdmin {
     if (closedFileSet != null) {
       for (Path closedFilePath : closedFileSet) {
         assertThat(outStr,
-            not(containsString(closedFilePath.toString() + "\n")));
+            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())));
     }
   }