You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/11/19 22:10:42 UTC

svn commit: r1411414 - /camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java

Author: bvahdat
Date: Mon Nov 19 21:10:41 2012
New Revision: 1411414

URL: http://svn.apache.org/viewvc?rev=1411414&view=rev
Log:
Fixed the broken test by the "Camel.trunk.fulltest" CI-Profile.

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java?rev=1411414&r1=1411413&r2=1411414&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java Mon Nov 19 21:10:41 2012
@@ -21,7 +21,6 @@ import java.io.File;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * Unit test for consuming the same filename only.
@@ -36,20 +35,16 @@ public class FileConsumeAsyncTest extend
     }
 
     public void testConsumeAsync() throws Exception {
-        MockEndpoint before = getMockEndpoint("mock:before");
-        before.expectedMessageCount(1);
-        before.assertIsSatisfied();
+        getMockEndpoint("mock:before").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
 
         // file should still exist as its the async done that will complete it
-        assertTrue("File should not have been deleted", new File("target/files/report.txt").getAbsoluteFile().exists());
-
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(1);
-        mock.assertIsSatisfied();
+        assertTrue("File should not have been deleted", new File("target/files/report.txt").exists());
 
         oneExchangeDone.matchesMockWaitTime();
+        assertMockEndpointsSatisfied();
 
-        assertFalse("File should been deleted", new File("target/files/report.txt").getAbsoluteFile().exists());
+        assertFalse("File should have been deleted", new File("target/files/report.txt").exists());
     }
 
     @Override