Repository: commons-io
Updated Branches:
  refs/heads/master 31e141019 -> 419ad3e4a


Use temporary dir that can be fully deleted

Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/419ad3e4
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/419ad3e4
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/419ad3e4

Branch: refs/heads/master
Commit: 419ad3e4aaeb2471c86eec1b6799675a70bc12cb
Parents: 31e1410
Author: Sebb <s...@apache.org>
Authored: Sun Apr 23 16:36:25 2017 +0100
Committer: Sebb <s...@apache.org>
Committed: Sun Apr 23 16:36:25 2017 +0100

----------------------------------------------------------------------
 .../org/apache/commons/io/testtools/FileBasedTestCase.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-io/blob/419ad3e4/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java 
b/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
index 33b6941..5325bc9 100644
--- a/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
+++ b/src/test/java/org/apache/commons/io/testtools/FileBasedTestCase.java
@@ -17,6 +17,7 @@
 package org.apache.commons.io.testtools;
 
 import java.io.*;
+import static org.junit.Assert.fail;
 
 /**
  * Base class for testcases doing tests with files.
@@ -28,9 +29,12 @@ public abstract class FileBasedTestCase  {
     @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;
     }
 

Reply via email to