Use temporary dir that can be fully deleted
MODIFY
src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
package org.apache.commons.io.testtools;
import java.io.*;
+import static org.junit.Assert.fail;
/**
* Base class for testcases doing tests with files.
@SuppressWarnings("ResultOfMethodCallIgnored")
public static File getTestDirectory() {
if (testDir == null) {
- testDir = new File("test/io/").getAbsoluteFile();
+ testDir = new File("target/test_io/").getAbsoluteFile();
}
testDir.mkdirs();
+ if (!testDir.isDirectory()) {
+ fail("Could not create directory " + testDir);
+ }
return testDir;
}

Use temporary dir that can be fully deleted