Browse Source

HDFS-12315. Use Path instead of String to check closedFiles set. Contributed by Oleg Danilov.

Oleg Danilov 6 years ago
parent
commit
d41310a15d

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java

@@ -262,7 +262,7 @@ public class TestHdfsAdmin {
     while (openFilesRemoteItr.hasNext()) {
       String filePath = openFilesRemoteItr.next().getFilePath();
       assertFalse(filePath + " should not be listed under open files!",
-          closedFiles.contains(filePath));
+          closedFiles.contains(new Path(filePath)));
       assertTrue(filePath + " is not listed under open files!",
           openFiles.remove(new Path(filePath)));
     }