Browse Source

HADOOP-16885. Fix hadoop-commons TestCopy failure

Followup to HADOOP-16885: Encryption zone file copy failure leaks a temp file

Moving the delete() call broke a mocking test, which slipped through the review process.

Contributed by Steve Loughran.

Change-Id: Ia13faf0f4fffb1c99ddd616d823e4f4d0b7b0cbb
Steve Loughran 5 years ago
parent
commit
d0a7c790c6

+ 1 - 1
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopy.java

@@ -121,7 +121,7 @@ public class TestCopy {
 
     tryCopyStream(in, false);
     verify(mockFs, never()).rename(any(Path.class), any(Path.class));
-    verify(mockFs, never()).delete(eq(tmpPath), anyBoolean());
+    verify(mockFs).delete(eq(tmpPath), anyBoolean());
     verify(mockFs, never()).delete(eq(path), anyBoolean());
     verify(mockFs, never()).close();
   }