You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2016/06/26 14:26:35 UTC

svn commit: r1750250 - in /commons/proper/io/trunk/src: changes/ test/java/org/apache/commons/io/ test/java/org/apache/commons/io/output/

Author: britter
Date: Sun Jun 26 14:26:35 2016
New Revision: 1750250

URL: http://svn.apache.org/viewvc?rev=1750250&view=rev
Log:
IO-511: After a few unit tests, a few newly created directories not cleaned completely. Thanks to Ahmet Celik. This also closes #13 from GitHub.

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java

Modified: commons/proper/io/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/changes/changes.xml?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/changes/changes.xml (original)
+++ commons/proper/io/trunk/src/changes/changes.xml Sun Jun 26 14:26:35 2016
@@ -47,6 +47,9 @@ The <action> type attribute can be add,u
   <body>
     <!-- The release date is the date RC is cut -->
     <release version="2.6" date="2016-MM-DD" description="New features and bug fixes.">
+      <action issue="IO-511" dev="britter" type="fix" due-to="Ahmet Celik">
+        After a few unit tests, a few newly created directories not cleaned completely.
+      </action>
       <action issue="IO-502" dev="ggregory" type="fix" due-to="Christian Schulte">
         Exceptions are suppressed incorrectly when copying files.
       </action>

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileDeleteStrategyTestCase.java Sun Jun 26 14:26:35 2016
@@ -18,6 +18,7 @@ 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 java.io.BufferedOutputStream;
@@ -162,4 +163,9 @@ public class FileDeleteStrategyTestCase
         assertEquals("FileDeleteStrategy[Force]", FileDeleteStrategy.FORCE.toString());
     }
 
+    @After
+    public void tearDown() throws Exception {
+        FileUtils.deleteDirectory(getTestDirectory());
+    }
+
 }

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsCleanDirectoryTestCase.java Sun Jun 26 14:26:35 2016
@@ -57,6 +57,7 @@ public class FileUtilsCleanDirectoryTest
     public void tearDown() throws Exception {
         chmod(top, 775, true);
         FileUtils.deleteDirectory(top);
+        FileUtils.deleteDirectory(getTestDirectory());
     }
 
     //-----------------------------------------------------------------------

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsFileNewerTestCase.java Sun Jun 26 14:26:35 2016
@@ -81,6 +81,7 @@ public class FileUtilsFileNewerTestCase
     public void tearDown() throws Exception {
         m_testFile1.delete();
         m_testFile2.delete();
+        FileUtils.deleteDirectory(getTestDirectory());
     }
 
     /**

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsListFilesTestCase.java Sun Jun 26 14:26:35 2016
@@ -88,6 +88,7 @@ public class FileUtilsListFilesTestCase
     public void tearDown() throws Exception {
         final File dir = getLocalTestDirectory();
         FileUtils.deleteDirectory(dir);
+        FileUtils.deleteDirectory(getTestDirectory());
     }
 
     private Collection<String> filesToFilenames(final Collection<File> files) {

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java?rev=1750250&r1=1750249&r2=1750250&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java Sun Jun 26 14:26:35 2016
@@ -22,6 +22,7 @@ import java.io.Writer;
 import java.nio.charset.UnsupportedCharsetException;
 
 import org.apache.commons.io.Charsets;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.testtools.FileBasedTestCase;
 import org.junit.After;
@@ -56,10 +57,11 @@ public class LockableFileWriterTest exte
     }
 
     @After
-    public void tearDown() {
+    public void tearDown() throws IOException {
         file.delete();
         lockFile.delete();
         altLockFile.delete();
+        FileUtils.deleteDirectory(altLockDir);
     }
 
     //-----------------------------------------------------------------------