FileUtilTestCase.testForceDeleteDir() should not delete
testDirectory parent
MODIFY
src/changes/changes.xml
src/changes/changes.xml
@@ -47,6 +47,9 @@ The <action> type attribute can be add,update,fix,remove.
<body>
<!-- The release date is the date RC is cut -->
<release version="2.6" date="2017-MM-DD" description="New features and bug fixes.">
+ <action issue="IO-534" dev="sebb" type="fix">
+ FileUtilTestCase.testForceDeleteDir() should not delete testDirectory parent
+ </action>
<action issue="IO-528" dev="pschumacher" type="fix" due-to="Dave Moten">
fix Tailer.run race condition runaway logging
</action>

MODIFY
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -1619,10 +1619,9 @@ public void testCopyFile2ToDir() throws Exception {
@Test
public void testForceDeleteDir() throws Exception {
final File testDirectory = getTestDirectory();
- FileUtils.forceDelete(testDirectory.getParentFile());
- assertTrue(
- "Check No Exist",
- !testDirectory.getParentFile().exists());
+ assertTrue("TestDirectory must exist", testDirectory.exists());
+ FileUtils.forceDelete(testDirectory);
+ assertFalse("TestDirectory must not exist", testDirectory.exists());
}
/*

IO-534 FileUtilTestCase.testForceDeleteDir() should not delete
testDirectory parent