소스 검색

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

Ayush Saxena 5 년 전
부모
커밋
79e03fb622
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileContextResolveAfs.java

+ 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();
   }
 }