1
0
Pārlūkot izejas kodu

HADOOP-16971. TestFileContextResolveAfs#testFileContextResolveAfs creates dangling link and fails for subsequent runs. Contributed by Ctest.

Ayush Saxena 5 gadi atpakaļ
vecāks
revīzija
79e03fb622

+ 2 - 2
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileContextResolveAfs.java

@@ -61,8 +61,8 @@ public class TestFileContextResolveAfs {
     fc.createSymlink(localPath, linkPath, true);
     Set<AbstractFileSystem> afsList = fc.resolveAbstractFileSystems(linkPath);
     Assert.assertEquals(1, afsList.size());
-    localFs.deleteOnExit(localPath);
-    localFs.deleteOnExit(linkPath);
+    localFs.delete(linkPath, true);
+    localFs.delete(localPath, true);
     localFs.close();
   }
 }