camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r888432 - in /camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote: FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java FtpConsumerLocalWorkDirectoryTest.java
Date Tue, 08 Dec 2009 15:14:56 GMT
Author: davsclaus
Date: Tue Dec  8 15:14:56 2009
New Revision: 888432

URL: http://svn.apache.org/viewvc?rev=888432&view=rev
Log:
Fixing tests on Windows which needs time to clean resources before deleting files.

Modified:
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java?rev=888432&r1=888431&r2=888432&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryAsAbsolutePathTest.java
Tue Dec  8 15:14:56 2009
@@ -71,7 +71,8 @@
 
         assertMockEndpointsSatisfied();
 
-        Thread.sleep(200);
+        // give test some time to close file resources
+        Thread.sleep(2000);
 
         // now the lwd file should be deleted
         File local = new File("target/lwd/hello.txt").getAbsoluteFile();
@@ -80,7 +81,7 @@
         // and the out file should exists
         File out = new File("target/out/hello.txt").getAbsoluteFile();
         assertTrue("file should exists", out.exists());
-        assertEquals("Hello World", IOConverter.toString(out));
+        assertEquals("Hello World", IOConverter.toString(out, null));
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java?rev=888432&r1=888431&r2=888432&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpConsumerLocalWorkDirectoryTest.java
Tue Dec  8 15:14:56 2009
@@ -68,7 +68,8 @@
 
         assertMockEndpointsSatisfied();
 
-        Thread.sleep(200);
+        // give test some time to close file resources
+        Thread.sleep(2000);
 
         // now the lwd file should be deleted
         File local = new File("target/lwd/hello.txt").getAbsoluteFile();
@@ -77,7 +78,7 @@
         // and the out file should exists
         File out = new File("target/out/hello.txt").getAbsoluteFile();
         assertTrue("file should exists", out.exists());
-        assertEquals("Hello World", IOConverter.toString(out));
+        assertEquals("Hello World", IOConverter.toString(out, null));
     }
 
     protected RouteBuilder createRouteBuilder() throws Exception {



Mime
View raw message