HDFS-15632. AbstractContractDeleteTest should set recursive peremeter to true for recursive test cases. Contributed by Anton Kutuzov.
(cherry picked from commit 91d4ba57c5
)
This commit is contained in:
parent
d20b2deac3
commit
dcf6d77279
@ -49,18 +49,17 @@ public void testDeleteNonexistentPathRecursive() throws Throwable {
|
|||||||
Path path = path("testDeleteNonexistentPathRecursive");
|
Path path = path("testDeleteNonexistentPathRecursive");
|
||||||
assertPathDoesNotExist("leftover", path);
|
assertPathDoesNotExist("leftover", path);
|
||||||
ContractTestUtils.rejectRootOperation(path);
|
ContractTestUtils.rejectRootOperation(path);
|
||||||
assertFalse("Returned true attempting to delete"
|
assertFalse("Returned true attempting to recursively delete"
|
||||||
+ " a nonexistent path " + path,
|
+ " a nonexistent path " + path,
|
||||||
getFileSystem().delete(path, false));
|
getFileSystem().delete(path, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteNonexistentPathNonRecursive() throws Throwable {
|
public void testDeleteNonexistentPathNonRecursive() throws Throwable {
|
||||||
Path path = path("testDeleteNonexistentPathNonRecursive");
|
Path path = path("testDeleteNonexistentPathNonRecursive");
|
||||||
assertPathDoesNotExist("leftover", path);
|
assertPathDoesNotExist("leftover", path);
|
||||||
ContractTestUtils.rejectRootOperation(path);
|
ContractTestUtils.rejectRootOperation(path);
|
||||||
assertFalse("Returned true attempting to recursively delete"
|
assertFalse("Returned true attempting to non recursively delete"
|
||||||
+ " a nonexistent path " + path,
|
+ " a nonexistent path " + path,
|
||||||
getFileSystem().delete(path, false));
|
getFileSystem().delete(path, false));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user