commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1198773 - in /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2: FileExtensionSelectorTest.java FileIteratorTest.java
Date Mon, 07 Nov 2011 15:15:34 GMT
Author: ggregory
Date: Mon Nov  7 15:15:34 2011
New Revision: 1198773

URL: http://svn.apache.org/viewvc?rev=1198773&view=rev
Log:
Fix bus in test suite. Individual tests ran ok, but not one after the next.

Modified:
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
    commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileIteratorTest.java

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1198773&r1=1198772&r2=1198773&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
Mon Nov  7 15:15:34 2011
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.vfs2;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
@@ -51,6 +50,7 @@ public class FileExtensionSelectorTest
     public static void setUpClass() throws Exception
     {
         BaseFolder = VFS.getManager().resolveFile("ram://" + FileExtensionSelectorTest.class.getName());
+        BaseFolder.deleteAll();
         BaseFolder.createFolder();
         BaseFolder.resolveFile("a.htm").createFile();
         BaseFolder.resolveFile("a.html").createFile();

Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileIteratorTest.java?rev=1198773&r1=1198772&r2=1198773&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileIteratorTest.java
(original)
+++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileIteratorTest.java
Mon Nov  7 15:15:34 2011
@@ -2,6 +2,7 @@ package org.apache.commons.vfs2;
 
 import java.util.Iterator;
 
+import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -25,7 +26,8 @@ public class FileIteratorTest
     @BeforeClass
     public static void setUpClass() throws Exception
     {
-        BaseFolder = VFS.getManager().resolveFile("ram://" + FileExtensionSelectorTest.class.getName());
+        BaseFolder = VFS.getManager().resolveFile("ram://" + FileIteratorTest.class.getName());
+        BaseFolder.deleteAll();
         BaseFolder.resolveFile("a.htm").createFile();
         BaseFolder.resolveFile("a.html").createFile();
         BaseFolder.resolveFile("a.xhtml").createFile();
@@ -41,6 +43,20 @@ public class FileIteratorTest
         BaseFolder.resolveFile("subdir2/subfile1.txt").createFile();
     }
 
+    /**
+     * Deletes RAM FS files.
+     * 
+     * @throws Exception
+     */
+    @AfterClass
+    public static void tearDownClass() throws Exception
+    {
+        if (BaseFolder != null)
+        {
+            BaseFolder.deleteAll();
+        }
+    }
+
     @Test
     public void testIterator() throws FileSystemException
     {



Mime
View raw message