Updated Branches: refs/heads/camel-2.11.x 8e294be90 -> fef28ef01 refs/heads/camel-2.12.x d77ad147d -> 6751da910 refs/heads/master 9a22923cf -> 000581e67
Fixed test Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b8087c6d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b8087c6d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b8087c6d Branch: refs/heads/master Commit: b8087c6d0ea4a91b59bb806d95c3cf1a21a898ee Parents: 9a22923 Author: Claus Ibsen <davscl...@apache.org> Authored: Mon Nov 18 11:16:51 2013 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Mon Nov 18 11:16:51 2013 +0100 ---------------------------------------------------------------------- .../file/FileConsumePollEnrichFileTest.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b8087c6d/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java index 726785a..d9dcaac 100644 --- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileTest.java @@ -35,20 +35,17 @@ public class FileConsumePollEnrichFileTest extends ContextTestSupport { MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedBodiesReceived("Big file"); + mock.expectedFileExists("target/enrich/.done/AAA.fin"); + mock.expectedFileExists("target/enrichdata/.done/AAA.dat"); template.sendBodyAndHeader("file://target/enrich", "Start", Exchange.FILE_NAME, "AAA.fin"); - log.info("Sleeping for 2 sec before writing enrichdata file"); - Thread.sleep(2000); + log.info("Sleeping for 1 sec before writing enrichdata file"); + Thread.sleep(1000); template.sendBodyAndHeader("file://target/enrichdata", "Big file", Exchange.FILE_NAME, "AAA.dat"); log.info("... write done"); - mock.assertIsSatisfied(); - - // 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"); + assertMockEndpointsSatisfied(); } @Override @@ -58,7 +55,7 @@ public class FileConsumePollEnrichFileTest extends ContextTestSupport { public void configure() throws Exception { from("file://target/enrich?move=.done") .to("mock:start") - .pollEnrich("file://target/enrichdata?move=.done", 20000) + .pollEnrich("file://target/enrichdata?move=.done", 10000) .to("mock:result"); } };