commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-io git commit: Replace custom temporary folder management with JUnit's TemporaryFolder. This will allow Maven to run tests concurrently.
Date Wed, 27 Sep 2017 19:12:56 GMT
Repository: commons-io
Updated Branches:
  refs/heads/master d654978ff -> 2a31bc5fc


Replace custom temporary folder management with JUnit's TemporaryFolder.
This will allow Maven to run tests concurrently.

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

Branch: refs/heads/master
Commit: 2a31bc5fc0282cbeffe8e41c1c8c576314b4eec1
Parents: d654978
Author: Gary Gregory <ggregory@apache.org>
Authored: Wed Sep 27 13:12:54 2017 -0600
Committer: Gary Gregory <ggregory@apache.org>
Committed: Wed Sep 27 13:12:54 2017 -0600

----------------------------------------------------------------------
 .../commons/io/FileDeleteStrategyTestCase.java  | 26 +++++++++++++-------
 1 file changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-io/blob/2a31bc5f/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java b/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
index 80c26f6..3d76ea6 100644
--- a/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
+++ b/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
@@ -16,27 +16,35 @@
  */
 package org.apache.commons.io;
 
-import org.apache.commons.io.testtools.FileBasedTestCase;
-import org.apache.commons.io.testtools.TestUtils;
-import org.junit.After;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import org.apache.commons.io.testtools.TestUtils;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 /**
  * Test for FileDeleteStrategy.
  *
  * @see FileDeleteStrategy
  */
-public class FileDeleteStrategyTestCase extends FileBasedTestCase {
+public class FileDeleteStrategyTestCase {
+
+    @Rule
+    public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+    private File getTestDirectory() {
+        return temporaryFolder.getRoot();
+    }
 
     //-----------------------------------------------------------------------
     @Test


Mime
View raw message