You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by cm...@apache.org on 2012/09/09 16:55:19 UTC

svn commit: r1382513 - /camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java

Author: cmueller
Date: Sun Sep  9 14:55:18 2012
New Revision: 1382513

URL: http://svn.apache.org/viewvc?rev=1382513&view=rev
Log:
fixed test which randomly fail on slow CI server

Modified:
    camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java

Modified: camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java?rev=1382513&r1=1382512&r2=1382513&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java (original)
+++ camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java Sun Sep  9 14:55:18 2012
@@ -21,9 +21,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
-/**
- * @version 
- */
 public class FileConsumePollEnrichFileTest extends ContextTestSupport {
 
     @Override
@@ -39,13 +36,14 @@ public class FileConsumePollEnrichFileTe
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Big file");
 
-        mock.expectedFileExists("target/enrich/.done/AAA.fin", "Start");
-        mock.expectedFileExists("target/enrichdata/.done/AAA.dat", "Big file");
-
         template.sendBodyAndHeader("file://target/enrichdata", "Big file", Exchange.FILE_NAME, "AAA.dat");
         template.sendBodyAndHeader("file://target/enrich", "Start", Exchange.FILE_NAME, "AAA.fin");
 
         assertMockEndpointsSatisfied();
+        // because the on completion is executed async, we should wait a bit to not fail on slow CI servers
+        Thread.sleep(200);
+        assertFileExists("target/enrich/.done/AAA.fin");
+        assertFileExists("target/enrichdata/.done/AAA.dat");
     }
 
     @Override