camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1411417 - in /camel/branches/camel-2.10.x: ./ camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
Date Mon, 19 Nov 2012 21:12:57 GMT
Author: bvahdat
Date: Mon Nov 19 21:12:56 2012
New Revision: 1411417

URL: http://svn.apache.org/viewvc?rev=1411417&view=rev
Log:
Merged revisions 1411414 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1411414 | bvahdat | 2012-11-19 22:10:41 +0100 (Mo, 19 Nov 2012) | 1 line
  
  Fixed the broken test by the "Camel.trunk.fulltest" CI-Profile.
........

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1411414

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java?rev=1411417&r1=1411416&r2=1411417&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
(original)
+++ camel/branches/camel-2.10.x/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
Mon Nov 19 21:12:56 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



Mime
View raw message