Explorar o código

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

Ayush Saxena %!s(int64=5) %!d(string=hai) anos
pai
achega
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();
   }
 }