commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1006295 - in /commons/proper/io/trunk/src/test/java/org/apache/commons/io: input/TailerTest.java output/FileWriterWithEncodingTest.java
Date Sun, 10 Oct 2010 14:15:51 GMT
Author: niallp
Date: Sun Oct 10 14:15:51 2010
New Revision: 1006295

URL: http://svn.apache.org/viewvc?rev=1006295&view=rev
Log:
Clean up after test

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java?rev=1006295&r1=1006294&r2=1006295&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/TailerTest.java Sun
Oct 10 14:15:51 2010
@@ -41,6 +41,11 @@ public class TailerTest extends FileBase
         super(name);
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        FileUtils.deleteDirectory(getTestDirectory());
+    }
+
     public void testTailer() throws Exception {
 
         // Create & start the Tailer

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java?rev=1006295&r1=1006294&r2=1006295&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/FileWriterWithEncodingTest.java
Sun Oct 10 14:15:51 2010
@@ -27,6 +27,7 @@ import java.util.Map;
 
 import junit.framework.AssertionFailedError;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.testtools.FileBasedTestCase;
 
@@ -68,10 +69,9 @@ public class FileWriterWithEncodingTest 
     }
 
     @Override
-    public void tearDown() {
+    public void tearDown() throws Exception {
+        FileUtils.deleteDirectory(getTestDirectory());
         defaultEncoding = null;
-        file1.delete();
-        file2.delete();
         textContent = null;
     }
 



Mime
View raw message