Author: scolebourne
Date: Sun Mar 12 07:13:45 2006
New Revision: 385294

URL: http://svn.apache.org/viewcvs?rev=385294&view=rev
Log:
Break out waitFor test for Windows2000 reasons
bug 38927, from Niall Pemberton

Added:
    
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
   (with props)
Modified:
    
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
    
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java

Modified: 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java?rev=385294&r1=385293&r2=385294&view=diff
==============================================================================
--- 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
 (original)
+++ 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
 Sun Mar 12 07:13:45 2006
@@ -109,14 +109,6 @@
             "1 GB");
     }
 
-    // waitFor
-
-    public void testWaitFor() {
-        FileUtils.waitFor(new File(""), -1);
-
-        FileUtils.waitFor(new File(""), 2);
-    }
-
     //-----------------------------------------------------------------------
     public void testToFile1() throws Exception {
         URL url = new URL("file", null, "a/b/c/file.txt");

Added: 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java?rev=385294&view=auto
==============================================================================
--- 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
 (added)
+++ 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
 Sun Mar 12 07:13:45 2006
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.io;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.apache.commons.io.testtools.FileBasedTestCase;
+
+/**
+ * This is used to test FileUtils.waitFor() method for correctness.
+ *
+ * @version $Id$
+ * @see FileUtils
+ */
+public class FileUtilsWaitForTestCase extends FileBasedTestCase {
+    // This class has been broken out from FileUtilsTestCase
+    // to solve issues as per BZ 38927
+
+    public static void main(String[] args) {
+        TestRunner.run(suite());
+    }
+
+    public static Test suite() {
+        return new TestSuite(FileUtilsWaitForTestCase.class);
+    }
+
+    public FileUtilsWaitForTestCase(String name) throws IOException {
+        super(name);
+    }
+
+    /** @see junit.framework.TestCase#setUp() */
+    protected void setUp() throws Exception {
+        getTestDirectory().mkdirs();
+    }
+
+    /** @see junit.framework.TestCase#tearDown() */
+    protected void tearDown() throws Exception {
+        FileUtils.deleteDirectory(getTestDirectory());
+    }
+
+    //-----------------------------------------------------------------------
+    public void testWaitFor() {
+        FileUtils.waitFor(new File(""), -1);
+        FileUtils.waitFor(new File(""), 2);
+    }
+
+}

Propchange: 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsWaitForTestCase.java
------------------------------------------------------------------------------
    svn:keywords = "author date id revision"

Modified: 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java?rev=385294&r1=385293&r2=385294&view=diff
==============================================================================
--- 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java
 (original)
+++ 
jakarta/commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java
 Sun Mar 12 07:13:45 2006
@@ -52,6 +52,7 @@
         suite.addTest(new TestSuite(IOUtilsTestCase.class));
         suite.addTest(new TestSuite(IOUtilsWriteTestCase.class));
         suite.addTest(new TestSuite(LineIteratorTestCase.class));
+        suite.addTest(new TestSuite(FileUtilsWaitForTestCase.class));
         return suite;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to