You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/07/08 10:47:04 UTC

[1/3] camel git commit: CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.

Repository: camel
Updated Branches:
  refs/heads/master dcb001f0d -> ffc08f480


CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cc1edc91
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cc1edc91
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cc1edc91

Branch: refs/heads/master
Commit: cc1edc915b85cda9a37b677d9321a7dc8fd25f31
Parents: dcb001f
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 8 11:07:06 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 8 11:07:06 2017 +0200

----------------------------------------------------------------------
 .../AntPathMatcherGenericFileFilterTest.java    | 30 ++++++----
 .../file/DirectoryCreateIssueTest.java          |  2 +-
 .../FileAbsoluteAndRelativeConsumerTest.java    |  4 +-
 .../file/FileAbsolutePathIssueTest.java         |  2 +-
 .../file/FileBeginFailureOneTimeTest.java       |  2 +-
 .../file/FileBrowsableEndpointTest.java         |  8 +--
 .../FileConcurrentWriteAppendSameFileTest.java  |  4 +-
 ...FileConsumeAlterFileNameHeaderIssueTest.java |  8 +--
 .../component/file/FileConsumeAsyncTest.java    | 63 --------------------
 .../file/FileConsumeBackoffMultiplierTest.java  |  3 +-
 .../component/file/FileConsumeCharsetTest.java  |  2 +-
 .../file/FileConsumeDoneFileIssueTest.java      |  8 +--
 .../file/FileConsumeFilesAndDeleteTest.java     | 10 ++--
 .../file/FileConsumeMaxMessagesPerPollTest.java |  2 +-
 .../file/FileConsumeMoveRelativeNameTest.java   |  2 +-
 .../FileConsumeMultipleDirectoriesTest.java     |  9 +--
 .../file/FileConsumeNoopIdempotentAutoTest.java |  2 +-
 .../FileConsumeNoopIdempotentDisabledTest.java  |  2 +-
 .../FileConsumeNoopIdempotentEnabledTest.java   |  7 ++-
 ...leConsumeNotEagerMaxMessagesPerPollTest.java | 17 ++++--
 .../FilerConsumerDoneFileNameDeleteTest.java    |  2 +-
 .../file/stress/FileAsyncStressFileDropper.java |  2 +
 .../file/stress/FileAsyncStressManually.java    |  2 +
 .../FileAsyncStressReadLockLockFileTest.java    |  2 +
 .../stress/FileAsyncStressReadLockNoneTest.java |  2 +
 .../FileAsyncStressReadLockRenameTest.java      |  2 +
 .../file/stress/FileAsyncStressTest.java        |  2 +
 .../stress/FileConsumerPollManyFilesTest.java   |  2 +
 .../FileProducerAppendManyMessagesFastTest.java |  2 +
 .../FileProducerAppendManyMessagesTest.java     |  2 +
 30 files changed, 90 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java b/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
index 1e4c36a..026ecd3 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
@@ -158,17 +158,25 @@ public class AntPathMatcherGenericFileFilterTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/files/ant-path-1?recursive=true&antInclude=**/*.txt&antFilterCaseSensitive=true").convertBodyTo(String.class).to("mock:result1");
-                from("file://target/files/ant-path-5?recursive=true&antInclude=**/*.txt&antFilterCaseSensitive=false").convertBodyTo(String.class).to("mock:result5");
-
-                from("file://target/files/ant-path-2?recursive=true&antExclude=**/*.bak").convertBodyTo(String.class).to("mock:result2");
-                from("file://target/files/ant-path-6?recursive=true&antExclude=**/*.bak&antFilterCaseSensitive=false").convertBodyTo(String.class).to("mock:result6");
-
-                from("file://target/files/ant-path-3?recursive=true&antInclude=**/*.pdf,**/*.txt&antExclude=**/a*,**/b*").convertBodyTo(String.class).to("mock:result3");
-                from("file://target/files/ant-path-7?recursive=true&antInclude=**/*.Pdf,**/*.txt&antExclude=**/a*,**/b*&antFilterCaseSensitive=false").convertBodyTo(String.class).to("mock:result7");
-
-                from("file://target/files/ant-path-4?recursive=true&antInclude=**/*.txt&antExclude=**/a*&filter=#filter").convertBodyTo(String.class).to("mock:result4");
-                from("file://target/files/ant-path-8?recursive=true&antInclude=**/*.txt&antExclude=**/a*&filter=#caseInsensitiveFilter").convertBodyTo(String.class).to("mock:result8");
+                from("file://target/files/ant-path-1?initialDelay=0&delay=10&recursive=true&antInclude=**/*.txt&antFilterCaseSensitive=true")
+                    .convertBodyTo(String.class).to("mock:result1");
+                from("file://target/files/ant-path-5?initialDelay=0&delay=10&recursive=true&antInclude=**/*.txt&antFilterCaseSensitive=false")
+                    .convertBodyTo(String.class).to("mock:result5");
+
+                from("file://target/files/ant-path-2?initialDelay=0&delay=10&recursive=true&antExclude=**/*.bak")
+                    .convertBodyTo(String.class).to("mock:result2");
+                from("file://target/files/ant-path-6?initialDelay=0&delay=10&recursive=true&antExclude=**/*.bak&antFilterCaseSensitive=false")
+                    .convertBodyTo(String.class).to("mock:result6");
+
+                from("file://target/files/ant-path-3?initialDelay=0&delay=10&recursive=true&antInclude=**/*.pdf,**/*.txt&antExclude=**/a*,**/b*")
+                    .convertBodyTo(String.class).to("mock:result3");
+                from("file://target/files/ant-path-7?initialDelay=0&delay=10&recursive=true&antInclude=**/*.Pdf,**/*.txt&antExclude=**/a*,**/b*&antFilterCaseSensitive=false")
+                    .convertBodyTo(String.class).to("mock:result7");
+
+                from("file://target/files/ant-path-4?initialDelay=0&delay=10&recursive=true&antInclude=**/*.txt&antExclude=**/a*&filter=#filter")
+                    .convertBodyTo(String.class).to("mock:result4");
+                from("file://target/files/ant-path-8?initialDelay=0&delay=10&recursive=true&antInclude=**/*.txt&antExclude=**/a*&filter=#caseInsensitiveFilter")
+                    .convertBodyTo(String.class).to("mock:result8");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
index ed3f670..acf4966 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
@@ -71,7 +71,7 @@ public class DirectoryCreateIssueTest extends ContextTestSupport {
         assertMockEndpointsSatisfied();
 
         // wait a little while for the files to settle down
-        Thread.sleep(200);
+        Thread.sleep(50);
 
         for (int i = 0; i < numFiles; i++) {
             assertTrue((new File(path + "/file" + i + ".txt")).isFile());

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileAbsoluteAndRelativeConsumerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileAbsoluteAndRelativeConsumerTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileAbsoluteAndRelativeConsumerTest.java
index 0c0b808..2033ff3 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileAbsoluteAndRelativeConsumerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileAbsoluteAndRelativeConsumerTest.java
@@ -68,9 +68,9 @@ public class FileAbsoluteAndRelativeConsumerTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filerelative?recursive=true").convertBodyTo(String.class).to("mock:relative");
+                from("file://target/filerelative?initialDelay=0&delay=10&recursive=true").convertBodyTo(String.class).to("mock:relative");
 
-                from("file://" + base + "?recursive=true").convertBodyTo(String.class).to("mock:absolute");
+                from("file://" + base + "?initialDelay=0&delay=10&recursive=true").convertBodyTo(String.class).to("mock:absolute");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java
index d89b977..ce80210 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileAbsolutePathIssueTest.java
@@ -39,7 +39,7 @@ public class FileAbsolutePathIssueTest extends ContextTestSupport {
 
         start = new File("target/issue").getAbsolutePath();
         done = new File("target/done").getAbsolutePath();
-        uri = "file:" + start + "?move=" + done + "/${file:name}";
+        uri = "file:" + start + "?initialDelay=0&delay=10&move=" + done + "/${file:name}";
 
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
index 1391f33..78cd83c 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
@@ -60,7 +60,7 @@ public class FileBeginFailureOneTimeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/begin?processStrategy=#myStrategy")
+                from("file://target/begin?initialDelay=0&delay=10&processStrategy=#myStrategy")
                     .convertBodyTo(String.class)
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
index 16c97f4..a850f2f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
@@ -41,7 +41,7 @@ public class FileBrowsableEndpointTest extends ContextTestSupport {
     }
 
     public void testBrowsableNoFiles() throws Exception {
-        BrowsableEndpoint browse = context.getEndpoint("file:target/browse", BrowsableEndpoint.class);
+        BrowsableEndpoint browse = context.getEndpoint("file:target/browse?initialDelay=0&delay=10", BrowsableEndpoint.class);
         assertNotNull(browse);
 
         List<Exchange> list = browse.getExchanges();
@@ -52,7 +52,7 @@ public class FileBrowsableEndpointTest extends ContextTestSupport {
     public void testBrowsableOneFile() throws Exception {
         template.sendBodyAndHeader("file:target/browse", "A", Exchange.FILE_NAME, "a.txt");
 
-        FileEndpoint endpoint = context.getEndpoint("file:target/browse", FileEndpoint.class);
+        FileEndpoint endpoint = context.getEndpoint("file:target/browse?initialDelay=0&delay=10", FileEndpoint.class);
         assertNotNull(endpoint);
 
         MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
@@ -76,7 +76,7 @@ public class FileBrowsableEndpointTest extends ContextTestSupport {
         template.sendBodyAndHeader("file:target/browse", "A", Exchange.FILE_NAME, "a.txt");
         template.sendBodyAndHeader("file:target/browse", "B", Exchange.FILE_NAME, "b.txt");
 
-        FileEndpoint endpoint = context.getEndpoint("file:target/browse?sortBy=file:name", FileEndpoint.class);
+        FileEndpoint endpoint = context.getEndpoint("file:target/browse?initialDelay=0&delay=10&sortBy=file:name", FileEndpoint.class);
         assertNotNull(endpoint);
 
         MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
@@ -104,7 +104,7 @@ public class FileBrowsableEndpointTest extends ContextTestSupport {
         template.sendBodyAndHeader("file:target/browse", "B", Exchange.FILE_NAME, "foo/b.txt");
         template.sendBodyAndHeader("file:target/browse", "C", Exchange.FILE_NAME, "bar/c.txt");
 
-        FileEndpoint endpoint = context.getEndpoint("file:target/browse?recursive=true&sortBy=file:name", FileEndpoint.class);
+        FileEndpoint endpoint = context.getEndpoint("file:target/browse?initialDelay=0&delay=10&recursive=true&sortBy=file:name", FileEndpoint.class);
         assertNotNull(endpoint);
 
         MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
index 40c08fd..d663e31 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
@@ -52,7 +52,7 @@ public class FileConcurrentWriteAppendSameFileTest extends ContextTestSupport {
         mock.setResultWaitTime(30000);
 
         // we need to wait a bit for our slow CI server to make sure the entire file is written on disc
-        Thread.sleep(1000);
+        Thread.sleep(500);
         context.startRoute("foo");
 
         assertMockEndpointsSatisfied();
@@ -76,7 +76,7 @@ public class FileConcurrentWriteAppendSameFileTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/concurrent").routeId("foo").noAutoStartup()
+                from("file:target/concurrent?initialDelay=0&delay=10").routeId("foo").noAutoStartup()
                     .split(body().tokenize(LS)).parallelProcessing().streaming()
                         .setBody(body().append(":Status=OK").append(LS))
                         .to("file:target/concurrent/outbox?fileExist=Append&fileName=result.txt")

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAlterFileNameHeaderIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAlterFileNameHeaderIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAlterFileNameHeaderIssueTest.java
index c9c6d85..f3c1ef6 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAlterFileNameHeaderIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAlterFileNameHeaderIssueTest.java
@@ -43,7 +43,7 @@ public class FileConsumeAlterFileNameHeaderIssueTest extends ContextTestSupport
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/files?delete=true")
+                from("file://target/files?initialDelay=0&delay=10&delete=true")
                     // remove all headers
                     .removeHeaders("*")
                     .to("mock:result");
@@ -70,7 +70,7 @@ public class FileConsumeAlterFileNameHeaderIssueTest extends ContextTestSupport
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/files?delete=true")
+                from("file://target/files?initialDelay=0&delay=10&delete=true")
                     // change file header
                     .setHeader(Exchange.FILE_NAME, constant("bye.txt"))
                     .to("mock:result");
@@ -96,7 +96,7 @@ public class FileConsumeAlterFileNameHeaderIssueTest extends ContextTestSupport
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/files")
+                from("file://target/files?initialDelay=0&delay=10")
                     // remove all headers
                     .removeHeaders("*")
                     .to("mock:result");
@@ -123,7 +123,7 @@ public class FileConsumeAlterFileNameHeaderIssueTest extends ContextTestSupport
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/files")
+                from("file://target/files?initialDelay=0&delay=10")
                     // change file header
                     .setHeader(Exchange.FILE_NAME, constant("bye.txt"))
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
deleted file mode 100644
index ba0a6c0..0000000
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeAsyncTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.file;
-
-import java.io.File;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-
-/**
- * Unit test for consuming the same filename only.
- */
-public class FileConsumeAsyncTest extends ContextTestSupport {
-
-    @Override
-    protected void setUp() throws Exception {
-        deleteDirectory("target/files");
-        super.setUp();
-        template.sendBodyAndHeader("file://target/files", "Hello World", Exchange.FILE_NAME, "report.txt");
-    }
-
-    public void testConsumeAsync() throws Exception {
-        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").exists());
-
-        oneExchangeDone.matchesMockWaitTime();
-        assertMockEndpointsSatisfied();
-
-        assertFalse("File should have been deleted", new File("target/files/report.txt").exists());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            public void configure() throws Exception {
-                from("file://target/files/?delete=true&delay=10000")
-                    .convertBodyTo(String.class)
-                    .threads()
-                        .to("mock:before")
-                        .delay(1000)
-                        .to("mock:result");
-            }
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeBackoffMultiplierTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeBackoffMultiplierTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeBackoffMultiplierTest.java
index 45ace58..4652f2a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeBackoffMultiplierTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeBackoffMultiplierTest.java
@@ -46,7 +46,8 @@ public class FileConsumeBackoffMultiplierTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/files/?delete=true&backoffMultiplier=4&backoffIdleThreshold=3").convertBodyTo(String.class).to("mock:result");
+                from("file://target/files/?initialDelay=0&delay=10&delete=true&backoffMultiplier=4&backoffIdleThreshold=3")
+                    .convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
index 8937506..6b2230b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeCharsetTest.java
@@ -51,7 +51,7 @@ public class FileConsumeCharsetTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/files/?fileName=report.txt&delete=true&charset=UTF-8")
+                from("file://target/files/?initialDelay=0&delay=10&fileName=report.txt&delete=true&charset=UTF-8")
                     .convertBodyTo(String.class)
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeDoneFileIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeDoneFileIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeDoneFileIssueTest.java
index 4f05221..6b09323 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeDoneFileIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeDoneFileIssueTest.java
@@ -54,7 +54,7 @@ public class FileConsumeDoneFileIssueTest extends ContextTestSupport {
         assertMockEndpointsSatisfied();
         assertTrue(notify.matchesMockWaitTime());
 
-        Thread.sleep(250);
+        Thread.sleep(50);
 
         // the done file should be deleted
         assertFalse("Done file should be deleted", new File("target/done/foo.done").exists());
@@ -81,7 +81,7 @@ public class FileConsumeDoneFileIssueTest extends ContextTestSupport {
         assertMockEndpointsSatisfied();
         assertTrue(notify.matchesMockWaitTime());
 
-        Thread.sleep(250);
+        Thread.sleep(50);
 
         // the done file should be deleted
         assertFalse("Done file should be deleted", new File("target/done2/a.txt.done").exists());
@@ -95,11 +95,11 @@ public class FileConsumeDoneFileIssueTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/done?doneFileName=foo.done").routeId("foo").noAutoStartup()
+                from("file:target/done?doneFileName=foo.done&initialDelay=0&delay=10").routeId("foo").noAutoStartup()
                     .convertBodyTo(String.class)
                     .to("mock:result");
                 
-                from("file:target/done2?doneFileName=${file:name}.done")
+                from("file:target/done2?doneFileName=${file:name}.done&initialDelay=0&delay=10")
                     .routeId("bar").noAutoStartup()
                     .convertBodyTo(String.class)
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeFilesAndDeleteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeFilesAndDeleteTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeFilesAndDeleteTest.java
index f0e713b..c23425b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeFilesAndDeleteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeFilesAndDeleteTest.java
@@ -32,15 +32,16 @@ public class FileConsumeFilesAndDeleteTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/files");
         super.setUp();
-        template.sendBodyAndHeader("file://target/files", "Hello World", Exchange.FILE_NAME, "report.txt");
-        template.sendBodyAndHeader("file://target/files", "Bye World", Exchange.FILE_NAME, "report2.txt");
-        template.sendBodyAndHeader("file://target/files/2008", "2008 Report", Exchange.FILE_NAME, "report2008.txt");
     }
 
     public void testConsumeAndDelete() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World");
 
+        template.sendBodyAndHeader("file://target/files", "Bye World", Exchange.FILE_NAME, "report2.txt");
+        template.sendBodyAndHeader("file://target/files", "Hello World", Exchange.FILE_NAME, "report.txt");
+        template.sendBodyAndHeader("file://target/files/2008", "2008 Report", Exchange.FILE_NAME, "report2008.txt");
+
         assertMockEndpointsSatisfied();
 
         oneExchangeDone.matchesMockWaitTime();
@@ -53,7 +54,8 @@ public class FileConsumeFilesAndDeleteTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/files/?fileName=report.txt&delete=true").convertBodyTo(String.class).to("mock:result");
+                from("file://target/files/?initialDelay=0&delay=10&fileName=report.txt&delete=true")
+                    .convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMaxMessagesPerPollTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMaxMessagesPerPollTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMaxMessagesPerPollTest.java
index 84457cc..be920ba 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMaxMessagesPerPollTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMaxMessagesPerPollTest.java
@@ -26,7 +26,7 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumeMaxMessagesPerPollTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/poll/?maxMessagesPerPoll=2";
+    private String fileUrl = "file://target/poll/?initialDelay=0&delay=10&maxMessagesPerPoll=2";
 
     @Override
     protected void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMoveRelativeNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMoveRelativeNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMoveRelativeNameTest.java
index 845da58..f1b132d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMoveRelativeNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMoveRelativeNameTest.java
@@ -26,7 +26,7 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumeMoveRelativeNameTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/multidir/?recursive=true&move=.done/${file:name}.old";
+    private String fileUrl = "file://target/multidir/?initialDelay=0&delay=10&recursive=true&move=.done/${file:name}.old";
 
     @Override
     protected void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMultipleDirectoriesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMultipleDirectoriesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMultipleDirectoriesTest.java
index 7e8d23b..1154983 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMultipleDirectoriesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeMultipleDirectoriesTest.java
@@ -28,15 +28,12 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumeMultipleDirectoriesTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/multidir/?recursive=true&delete=true&initialDelay=2000&delay=5000&sortBy=file:path";
+    private String fileUrl = "file://target/multidir/?initialDelay=0&delay=10&recursive=true&delete=true&sortBy=file:path";
 
     @Override
     protected void setUp() throws Exception {
         deleteDirectory("target/multidir");
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
-        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
-        template.sendBodyAndHeader(fileUrl, "Godday World", Exchange.FILE_NAME, "sub/sub2/godday.txt");
     }
 
     @SuppressWarnings("unchecked")
@@ -44,6 +41,10 @@ public class FileConsumeMultipleDirectoriesTest extends ContextTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Bye World", "Hello World", "Godday World");
 
+        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
+        template.sendBodyAndHeader(fileUrl, "Godday World", Exchange.FILE_NAME, "sub/sub2/godday.txt");
+
         assertMockEndpointsSatisfied();
 
         Exchange exchange =  mock.getExchanges().get(0);

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentAutoTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentAutoTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentAutoTest.java
index 6e1655e..dc5d8c1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentAutoTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentAutoTest.java
@@ -30,7 +30,7 @@ public class FileConsumeNoopIdempotentAutoTest extends FileConsumeNoopIdempotent
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/noop?noop=true").convertBodyTo(String.class).to("mock:result");
+                from("file://target/noop?initialDelay=0&delay=10&noop=true").convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentDisabledTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentDisabledTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentDisabledTest.java
index 676a36d..1337e04 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentDisabledTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentDisabledTest.java
@@ -46,7 +46,7 @@ public class FileConsumeNoopIdempotentDisabledTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/noop?noop=true&idempotent=false").convertBodyTo(String.class).to("mock:result");
+                from("file://target/noop?initialDelay=0&delay=10&noop=true&idempotent=false").convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentEnabledTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentEnabledTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentEnabledTest.java
index 3fde598..dbac80f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentEnabledTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNoopIdempotentEnabledTest.java
@@ -30,7 +30,6 @@ public class FileConsumeNoopIdempotentEnabledTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/noop");
         super.setUp();
-        template.sendBodyAndHeader("file://target/noop", "Hello World", Exchange.FILE_NAME, "hello.txt");
     }
 
     public void testNoop() throws Exception {
@@ -38,8 +37,10 @@ public class FileConsumeNoopIdempotentEnabledTest extends ContextTestSupport {
         // should only be able to read the file once as idempotent is true
         mock.expectedMessageCount(1);
 
+        template.sendBodyAndHeader("file://target/noop", "Hello World", Exchange.FILE_NAME, "hello.txt");
+
         // give some time to let consumer try to read the file multiple times
-        Thread.sleep(250);
+        Thread.sleep(50);
 
         assertMockEndpointsSatisfied();
     }
@@ -49,7 +50,7 @@ public class FileConsumeNoopIdempotentEnabledTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/noop?noop=true&idempotent=true&delay=10").convertBodyTo(String.class).to("mock:result");
+                from("file://target/noop?noop=true&idempotent=true&initialDelay=0&delay=10").convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java
index 722adde..9a05de9 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeNotEagerMaxMessagesPerPollTest.java
@@ -27,22 +27,26 @@ import org.apache.camel.component.mock.MockEndpoint;
 public class FileConsumeNotEagerMaxMessagesPerPollTest extends ContextTestSupport {
 
     // sort by name and not eager, then we should pickup the files in order
-    private String fileUrl = "file://target/poll/?initialDelay=2000&delay=5000&"
+    private String fileUrl = "file://target/poll/?initialDelay=0&delay=10&"
             + "maxMessagesPerPoll=2&eagerMaxMessagesPerPoll=false&sortBy=file:name";
 
     @Override
     protected void setUp() throws Exception {
         deleteDirectory("target/poll");
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "CCC", Exchange.FILE_NAME, "ccc.txt");
-        template.sendBodyAndHeader(fileUrl, "AAA", Exchange.FILE_NAME, "aaa.txt");
-        template.sendBodyAndHeader(fileUrl, "BBB", Exchange.FILE_NAME, "bbb.txt");
     }
 
     public void testMaxMessagesPerPoll() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("AAA", "BBB");
-        mock.setResultWaitTime(4000);
+
+        template.sendBodyAndHeader(fileUrl, "CCC", Exchange.FILE_NAME, "ccc.txt");
+        template.sendBodyAndHeader(fileUrl, "AAA", Exchange.FILE_NAME, "aaa.txt");
+        template.sendBodyAndHeader(fileUrl, "BBB", Exchange.FILE_NAME, "bbb.txt");
+
+        // start route
+        context.startRoute("foo");
+
         mock.expectedPropertyReceived(Exchange.BATCH_SIZE, 2);
 
         assertMockEndpointsSatisfied();
@@ -57,7 +61,8 @@ public class FileConsumeNotEagerMaxMessagesPerPollTest extends ContextTestSuppor
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from(fileUrl).convertBodyTo(String.class).to("mock:result");
+                from(fileUrl).routeId("foo").noAutoStartup()
+                    .convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
index 353b019..843c078 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
@@ -39,7 +39,7 @@ public class FilerConsumerDoneFileNameDeleteTest extends ContextTestSupport {
         template.sendBodyAndHeader("file:target/done", "Hello World", Exchange.FILE_NAME, "hello.txt");
 
         // wait a bit and it should not pickup the written file as there are no done file
-        Thread.sleep(250);
+        Thread.sleep(50);
 
         assertMockEndpointsSatisfied();
         resetMocks();

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
index 67ee775..903d91a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
@@ -20,10 +20,12 @@ import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressFileDropper extends ContextTestSupport {
 
     private static int counter;

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManually.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManually.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManually.java
index 27a5766..395d22f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManually.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManually.java
@@ -23,10 +23,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressManually extends ContextTestSupport {
 
     public void testAsyncStress() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockLockFileTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockLockFileTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockLockFileTest.java
index 4aaf5a1..c44ba70 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockLockFileTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockLockFileTest.java
@@ -21,10 +21,12 @@ import java.util.Random;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressReadLockLockFileTest extends FileAsyncStressTest {
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockNoneTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockNoneTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockNoneTest.java
index f9e506f..8979dde 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockNoneTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockNoneTest.java
@@ -21,10 +21,12 @@ import java.util.Random;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressReadLockNoneTest extends FileAsyncStressTest {
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockRenameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockRenameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockRenameTest.java
index 41df78a..2398140 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockRenameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressReadLockRenameTest.java
@@ -21,10 +21,12 @@ import java.util.Random;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressReadLockRenameTest extends FileAsyncStressTest {
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java
index 0580723..9767dea 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressTest.java
@@ -23,10 +23,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileAsyncStressTest extends ContextTestSupport {
 
     private int files = 150;

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesTest.java
index 329714e..4f3403e 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesTest.java
@@ -20,10 +20,12 @@ import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  * @version 
  */
+@Ignore("Manual test")
 public class FileConsumerPollManyFilesTest extends ContextTestSupport {
 
     private static final int FILES = 200;

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesFastTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesFastTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesFastTest.java
index c82ba03..0cf9d8c 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesFastTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesFastTest.java
@@ -25,10 +25,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  *
  */
+@Ignore("Manual test")
 public class FileProducerAppendManyMessagesFastTest extends ContextTestSupport {
 
     private boolean enabled;

http://git-wip-us.apache.org/repos/asf/camel/blob/cc1edc91/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesTest.java
index 9874ace..b105698 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/stress/FileProducerAppendManyMessagesTest.java
@@ -22,10 +22,12 @@ import java.io.FileOutputStream;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
 /**
  *
  */
+@Ignore("Manual test")
 public class FileProducerAppendManyMessagesTest extends ContextTestSupport {
 
     private boolean enabled;


[3/3] camel git commit: CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.

Posted by da...@apache.org.
CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ffc08f48
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ffc08f48
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ffc08f48

Branch: refs/heads/master
Commit: ffc08f4806062aa29abfeab513e5731f5144053a
Parents: 76accb3
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 8 12:46:50 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 8 12:46:50 2017 +0200

----------------------------------------------------------------------
 .../file/FileConsumeRootDirManualTest.java        |  2 ++
 .../file/FileConsumeRunLoggingLevelTest.java      |  2 +-
 ...leConsumeSimpleAbsoluteMoveToAbsoluteTest.java | 10 ++++++----
 ...leConsumeSimpleAbsoluteMoveToRelativeTest.java |  9 +++++----
 ...leConsumeSimpleRelativeMoveToAbsoluteTest.java |  9 +++++----
 ...leConsumeSimpleRelativeMoveToRelativeTest.java |  9 +++++----
 .../file/FileConsumeSingleDirectoryOnlyTest.java  | 12 +++++-------
 .../file/FileConsumeWithDollarInPathTest.java     |  2 +-
 .../component/file/FileConsumerNoopTest.java      | 18 +++++++++---------
 ...ileConsumerPollStrategyPolledMessagesTest.java |  2 +-
 ...ileConsumerPollStrategyStopOnRollbackTest.java |  4 ++--
 ...PreMoveCopyAndDeleteOnRenameFailFalseTest.java |  2 +-
 .../file/FileConsumerPreMoveIssueTest.java        |  2 +-
 .../component/file/FileConsumerPreMoveTest.java   |  2 +-
 ...leConsumerPreMoveWithProbeContentTypeTest.java |  2 +-
 .../file/FileConsumerProducerRouteTest.java       |  9 +++++----
 .../file/FileConsumerRelativeFileNameTest.java    | 17 +++++++++++------
 .../file/FileConsumerSharedThreadPollTest.java    |  4 ++--
 .../file/FileConsumerSkipDotFilesTest.java        |  5 ++---
 .../file/FileContentBasedRouterTest.java          | 13 +++++++------
 20 files changed, 73 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRootDirManualTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRootDirManualTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRootDirManualTest.java
index 2ae4805..fdb1d96 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRootDirManualTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRootDirManualTest.java
@@ -19,7 +19,9 @@ package org.apache.camel.component.file;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Ignore;
 
+@Ignore("Manual test")
 public class FileConsumeRootDirManualTest extends ContextTestSupport {
 
     public void testSkipMe() {

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java
index b39559f..1d2dfda 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeRunLoggingLevelTest.java
@@ -44,7 +44,7 @@ public class FileConsumeRunLoggingLevelTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/files?runLoggingLevel=INFO")
+                from("file:target/files?runLoggingLevel=INFO&initialDelay=0&delay=10")
                     .to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToAbsoluteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToAbsoluteTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToAbsoluteTest.java
index a94df52..ff3dd3a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToAbsoluteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToAbsoluteTest.java
@@ -37,19 +37,21 @@ public class FileConsumeSimpleAbsoluteMoveToAbsoluteTest extends ContextTestSupp
         // use current dir as base as absolute path
         base = new File("").getAbsolutePath() + "/target/move";
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
-        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
-        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
     }
 
     public void testMoveToSubDir() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(3);
+
         // will flatten when using absolute path in move
         mock.expectedFileExists(base + "/.done/bye.txt");
         mock.expectedFileExists(base + "/.done/hello.txt");
         mock.expectedFileExists(base + "/.done/goodday.txt");
 
+        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
+        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -58,7 +60,7 @@ public class FileConsumeSimpleAbsoluteMoveToAbsoluteTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://" + base + "?recursive=true&move=" + base + "/.done")
+                from("file://" + base + "?recursive=true&move=" + base + "/.done&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToRelativeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToRelativeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToRelativeTest.java
index d91eb98..a683eff 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToRelativeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleAbsoluteMoveToRelativeTest.java
@@ -37,9 +37,6 @@ public class FileConsumeSimpleAbsoluteMoveToRelativeTest extends ContextTestSupp
         // use current dir as base as absolute path
         base = new File("").getAbsolutePath() + "/target/move";
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
-        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
-        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
     }
 
     public void testMoveToSubDir() throws Exception {
@@ -49,6 +46,10 @@ public class FileConsumeSimpleAbsoluteMoveToRelativeTest extends ContextTestSupp
         mock.expectedFileExists(base + "/sub/.done/hello.txt");
         mock.expectedFileExists(base + "/sub/sub2/.done/goodday.txt");
 
+        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
+        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -57,7 +58,7 @@ public class FileConsumeSimpleAbsoluteMoveToRelativeTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://" + base + "?recursive=true&move=.done")
+                from("file://" + base + "?recursive=true&move=.done&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToAbsoluteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToAbsoluteTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToAbsoluteTest.java
index 2eeb67f..7e423e6 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToAbsoluteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToAbsoluteTest.java
@@ -37,9 +37,6 @@ public class FileConsumeSimpleRelativeMoveToAbsoluteTest extends ContextTestSupp
         // use current dir as base as absolute path
         base = new File("").getAbsolutePath() + "/target/move";
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
-        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
-        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
     }
 
     public void testMoveToSubDir() throws Exception {
@@ -50,6 +47,10 @@ public class FileConsumeSimpleRelativeMoveToAbsoluteTest extends ContextTestSupp
         mock.expectedFileExists(base + "/.done/hello.txt");
         mock.expectedFileExists(base + "/.done/goodday.txt");
 
+        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
+        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -58,7 +59,7 @@ public class FileConsumeSimpleRelativeMoveToAbsoluteTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/move?recursive=true&move=" + base + "/.done")
+                from("file://target/move?recursive=true&move=" + base + "/.done&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToRelativeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToRelativeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToRelativeTest.java
index 6b0c96e..947b8dd 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToRelativeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSimpleRelativeMoveToRelativeTest.java
@@ -32,9 +32,6 @@ public class FileConsumeSimpleRelativeMoveToRelativeTest extends ContextTestSupp
     protected void setUp() throws Exception {
         deleteDirectory("target/move");
         super.setUp();
-        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
-        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
-        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
     }
 
     public void testMoveToSubDir() throws Exception {
@@ -44,6 +41,10 @@ public class FileConsumeSimpleRelativeMoveToRelativeTest extends ContextTestSupp
         mock.expectedFileExists("target/move/sub/.done/hello.txt");
         mock.expectedFileExists("target/move/sub/sub2/.done/goodday.txt");
 
+        template.sendBodyAndHeader(fileUrl, "Bye World", Exchange.FILE_NAME, "bye.txt");
+        template.sendBodyAndHeader(fileUrl, "Hello World", Exchange.FILE_NAME, "sub/hello.txt");
+        template.sendBodyAndHeader(fileUrl, "Goodday World", Exchange.FILE_NAME, "sub/sub2/goodday.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -52,7 +53,7 @@ public class FileConsumeSimpleRelativeMoveToRelativeTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/move?recursive=true&move=.done")
+                from("file://target/move?recursive=true&move=.done&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java
index 25511a6..8b3b99b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeSingleDirectoryOnlyTest.java
@@ -30,18 +30,16 @@ public class FileConsumeSingleDirectoryOnlyTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/singledirectoryonly");
         super.setUp();
-        template.sendBodyAndHeader("file://target/singledirectoryonly", "Hello World", Exchange.FILE_NAME, "report.txt");
-        template.sendBodyAndHeader("file://target/singledirectoryonly", "Bye World", Exchange.FILE_NAME, "report2.txt");
-        template.sendBodyAndHeader("file://target/singledirectoryonly/2008", "2008 Report", Exchange.FILE_NAME, "report2008.txt");
     }
 
     public void testConsumeFileOnly() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        // Default wait time of 10 sec is not quite long enough on slow
-        // machines.
-        mock.setResultWaitTime(15000L);
         mock.expectedBodiesReceivedInAnyOrder("Hello World", "Bye World");
 
+        template.sendBodyAndHeader("file://target/singledirectoryonly/2008", "2008 Report", Exchange.FILE_NAME, "report2008.txt");
+        template.sendBodyAndHeader("file://target/singledirectoryonly", "Hello World", Exchange.FILE_NAME, "report.txt");
+        template.sendBodyAndHeader("file://target/singledirectoryonly", "Bye World", Exchange.FILE_NAME, "report2.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -49,7 +47,7 @@ public class FileConsumeSingleDirectoryOnlyTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/singledirectoryonly/?recursive=false&delete=true")
+                from("file://target/singledirectoryonly/?recursive=false&delete=true&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java
index 3af9f37..b09101a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumeWithDollarInPathTest.java
@@ -46,7 +46,7 @@ public class FileConsumeWithDollarInPathTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:" + dir).to("mock:result");
+                from("file:" + dir + "?initialDelay=0&delay=10").to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerNoopTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerNoopTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerNoopTest.java
index edd1c28..98c240a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerNoopTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerNoopTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.file;
 
 import java.io.File;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
@@ -33,21 +34,19 @@ public class FileConsumerNoopTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/filenoop");
         super.setUp();
-        template.sendBodyAndHeader("file://target/filenoop", "Hello World", Exchange.FILE_NAME, "hello.txt");
-        template.sendBodyAndHeader("file://target/filenoop", "Bye World", Exchange.FILE_NAME, "bye.txt");
     }
 
     public void testNoop() throws Exception {
-        NotifyBuilder notify = new NotifyBuilder(context).whenDone(2).create();
-
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(2);
-        assertMockEndpointsSatisfied();
 
-        notify.matchesMockWaitTime();
+        template.sendBodyAndHeader("file://target/filenoop", "Hello World", Exchange.FILE_NAME, "hello.txt");
+        template.sendBodyAndHeader("file://target/filenoop", "Bye World", Exchange.FILE_NAME, "bye.txt");
+
+        assertMockEndpointsSatisfied();
 
-        File file = new File("target/filenoop");
-        assertEquals("There should be 2 files", 2, file.list().length);
+        assertTrue(new File("target/filenoop/hello.txt").exists());
+        assertTrue(new File("target/filenoop/bye.txt").exists());
     }
 
     @Override
@@ -55,7 +54,8 @@ public class FileConsumerNoopTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filenoop?noop=true&initialDelay=0&delay=10").convertBodyTo(String.class).to("mock:result");
+                from("file://target/filenoop?noop=true&initialDelay=0&delay=10")
+                    .convertBodyTo(String.class).to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
index f88198c..e6f2d68 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyPolledMessagesTest.java
@@ -36,7 +36,7 @@ public class FileConsumerPollStrategyPolledMessagesTest extends ContextTestSuppo
     private static int maxPolls;
     private final CountDownLatch latch = new CountDownLatch(1);
 
-    private String fileUrl = "file://target/pollstrategy/?consumer.pollStrategy=#myPoll";
+    private String fileUrl = "file://target/pollstrategy/?consumer.pollStrategy=#myPoll&initialDelay=0&delay=10";
 
     @Override
     protected JndiRegistry createRegistry() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
index 0408ae3..1c007f4 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPollStrategyStopOnRollbackTest.java
@@ -34,7 +34,7 @@ public class FileConsumerPollStrategyStopOnRollbackTest extends ContextTestSuppo
     private static int counter;
     private static volatile String event = "";
 
-    private String fileUrl = "file://target/pollstrategy/?pollStrategy=#myPoll";
+    private String fileUrl = "file://target/pollstrategy/?pollStrategy=#myPoll&initialDelay=0&delay=10";
 
     @Override
     protected JndiRegistry createRegistry() throws Exception {
@@ -55,7 +55,7 @@ public class FileConsumerPollStrategyStopOnRollbackTest extends ContextTestSuppo
         mock.expectedMessageCount(0);
 
         // let it run for a little while and since it fails first time we should never get a message
-        mock.assertIsSatisfied(2000);
+        mock.assertIsSatisfied(50);
 
         assertEquals("rollback", event);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest.java
index d09354e..2b9ec2b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest.java
@@ -28,7 +28,7 @@ public class FileConsumerPreMoveCopyAndDeleteOnRenameFailFalseTest extends FileC
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/premove?preMove=work/work-${file:name}&initialDelay=0&delay=100&copyAndDeleteOnRenameFail=false")
+                from("file://target/premove?preMove=work/work-${file:name}&initialDelay=0&delay=10&copyAndDeleteOnRenameFail=false")
                     .process(new MyPreMoveCheckerProcessor())
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveIssueTest.java
index 49b3f67..4a40075 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveIssueTest.java
@@ -49,7 +49,7 @@ public class FileConsumerPreMoveIssueTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/premove?preMove=before/${file:name.noext}-moved.${file:ext}")
+                from("file://target/premove?preMove=before/${file:name.noext}-moved.${file:ext}&initialDelay=0&delay=10")
                     .process(new MyPreMoveCheckerProcessor())
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
index 36b9eba..9ad0a69 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
@@ -66,7 +66,7 @@ public class FileConsumerPreMoveTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/premove?preMove=work/work-${file:name}&initialDelay=0&delay=100")
+                from("file://target/premove?preMove=work/work-${file:name}&initialDelay=0&delay=10")
                     .process(new MyPreMoveCheckerProcessor())
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveWithProbeContentTypeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveWithProbeContentTypeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveWithProbeContentTypeTest.java
index d4a4848..ffca435 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveWithProbeContentTypeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveWithProbeContentTypeTest.java
@@ -47,7 +47,7 @@ public class FileConsumerPreMoveWithProbeContentTypeTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/premove?probeContentType=true&preMove=work/work-${file:name}&initialDelay=0&delay=100")
+                from("file://target/premove?probeContentType=true&preMove=work/work-${file:name}&initialDelay=0&delay=10")
                     .to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerProducerRouteTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerProducerRouteTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerProducerRouteTest.java
index cde4484..ddf7b89b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerProducerRouteTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerProducerRouteTest.java
@@ -30,14 +30,15 @@ public class FileConsumerProducerRouteTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/file-test");
         super.setUp();
-        template.sendBodyAndHeader("file://target/file-test/a", "Hello World", Exchange.FILE_NAME, "hello.txt");
-        template.sendBodyAndHeader("file://target/file-test/a", "Bye World", Exchange.FILE_NAME, "bye.txt");
     }
 
     public void testFileRoute() throws Exception {
         MockEndpoint result = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         result.expectedMessageCount(2);
 
+        template.sendBodyAndHeader("file://target/file-test/a", "Hello World", Exchange.FILE_NAME, "hello.txt");
+        template.sendBodyAndHeader("file://target/file-test/a", "Bye World", Exchange.FILE_NAME, "bye.txt");
+
         result.assertIsSatisfied();
     }
 
@@ -45,8 +46,8 @@ public class FileConsumerProducerRouteTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                from("file:target/file-test/a").to("file:target/file-test/b");
-                from("file:target/file-test/b").to("mock:result");
+                from("file:target/file-test/a?initialDelay=0&delay=10").to("file:target/file-test/b");
+                from("file:target/file-test/b?initialDelay=0&delay=10").to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerRelativeFileNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerRelativeFileNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerRelativeFileNameTest.java
index e208679..e9362fa 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerRelativeFileNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerRelativeFileNameTest.java
@@ -30,11 +30,6 @@ public class FileConsumerRelativeFileNameTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/filename-consumer");
         super.setUp();
-        // the file name is also starting with target/filename-consumer
-        template.sendBodyAndHeader("file:target/filename-consumer", "Hello World",
-                Exchange.FILE_NAME, "target/filename-consumer-hello.txt");
-        template.sendBodyAndHeader("file:target/filename-consumer", "Bye World",
-                Exchange.FILE_NAME, "target/filename-consumer-bye.txt");
     }
 
     public void testValidFilenameOnExchange() throws Exception {
@@ -43,6 +38,14 @@ public class FileConsumerRelativeFileNameTest extends ContextTestSupport {
         // should have file name header set
         mock.allMessages().header(Exchange.FILE_NAME).isNotNull();
 
+        // the file name is also starting with target/filename-consumer
+        template.sendBodyAndHeader("file:target/filename-consumer", "Hello World",
+            Exchange.FILE_NAME, "target/filename-consumer-hello.txt");
+        template.sendBodyAndHeader("file:target/filename-consumer", "Bye World",
+            Exchange.FILE_NAME, "target/filename-consumer-bye.txt");
+
+        context.startAllRoutes();
+
         assertMockEndpointsSatisfied();
 
         // and expect name to contain target/filename-consumer-XXX.txt
@@ -55,7 +58,9 @@ public class FileConsumerRelativeFileNameTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/filename-consumer?recursive=true&sortBy=file:name").to("mock:result");
+                from("file:target/filename-consumer?initialDelay=0&delay=10&recursive=true&sortBy=file:name")
+                    .noAutoStartup()
+                    .to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSharedThreadPollTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSharedThreadPollTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSharedThreadPollTest.java
index fb0e582..2ab3ef2 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSharedThreadPollTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSharedThreadPollTest.java
@@ -69,10 +69,10 @@ public class FileConsumerSharedThreadPollTest extends ContextTestSupport {
                 pool = new ThreadPoolBuilder(context).poolSize(1).buildScheduled(this, "MySharedPool");
                 registry.put("myPool", pool);
 
-                from("file:target/a?scheduledExecutorService=#myPool").routeId("a")
+                from("file:target/a?initialDelay=0&delay=10&scheduledExecutorService=#myPool").routeId("a")
                     .to("direct:shared");
 
-                from("file:target/b?scheduledExecutorService=#myPool").routeId("b")
+                from("file:target/b?initialDelay=0&delay=10&scheduledExecutorService=#myPool").routeId("b")
                     .to("direct:shared");
 
                 from("direct:shared").routeId("shared")

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSkipDotFilesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSkipDotFilesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSkipDotFilesTest.java
index c2d55ba..38ee233 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSkipDotFilesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerSkipDotFilesTest.java
@@ -26,7 +26,7 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumerSkipDotFilesTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/dotfiles/";
+    private String fileUrl = "file://target/dotfiles/?initialDelay=0&delay=10";
 
     @Override
     protected void setUp() throws Exception {
@@ -37,17 +37,16 @@ public class FileConsumerSkipDotFilesTest extends ContextTestSupport {
     public void testSkipDotFiles() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(0);
+        mock.setResultWaitTime(100);
 
         template.sendBodyAndHeader("file:target/dotfiles/", "This is a dot file",
             Exchange.FILE_NAME, ".skipme");
 
-        mock.setResultWaitTime(2000);
         mock.assertIsSatisfied();
     }
 
     public void testSkipDotFilesWithARegularFile() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("Hello World");
 
         template.sendBodyAndHeader("file:target/dotfiles/", "This is a dot file",

http://git-wip-us.apache.org/repos/asf/camel/blob/ffc08f48/camel-core/src/test/java/org/apache/camel/component/file/FileContentBasedRouterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileContentBasedRouterTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileContentBasedRouterTest.java
index 923df5b..dc4ef39 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileContentBasedRouterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileContentBasedRouterTest.java
@@ -38,31 +38,30 @@ public class FileContentBasedRouterTest extends ContextTestSupport {
     }
 
     public void testRouteLondon() throws Exception {
-        sendFiles();
-
         MockEndpoint mock = getMockEndpoint("mock:london");
         mock.expectedMessageCount(1);
         // should not load the content of the body into memory unless demand for it
         // so the type received should be a GenericFile (holder for the file)
         mock.message(0).body().isInstanceOf(GenericFile.class);
 
+        sendFiles();
+
         assertMockEndpointsSatisfied();
     }
 
     public void testRouteParis() throws Exception {
-        sendFiles();
-
         MockEndpoint mock = getMockEndpoint("mock:paris");
         mock.expectedMessageCount(1);
         // should not load the content of the body into memory unless demand for it
         // so the type received should be a GenericFile (holder for the file)
         mock.message(0).body().isInstanceOf(GenericFile.class);
 
+        sendFiles();
+
         assertMockEndpointsSatisfied();
     }
 
     public void testRouteOther() throws Exception {
-        sendFiles();
 
         MockEndpoint mock = getMockEndpoint("mock:other");
         mock.expectedMessageCount(1);
@@ -71,6 +70,8 @@ public class FileContentBasedRouterTest extends ContextTestSupport {
         // so the type received should be a GenericFile (holder for the file)
         mock.message(0).body().isInstanceOf(GenericFile.class);
 
+        sendFiles();
+
         assertMockEndpointsSatisfied();
     }
 
@@ -79,7 +80,7 @@ public class FileContentBasedRouterTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/cbr?noop=true")
+                from("file://target/cbr?noop=true&initialDelay=0&delay=10")
                     .choice()
                         .when(header("CamelFileName").isEqualTo("london.txt")).to("mock:london")
                         .when(header("CamelFileName").isEqualTo("paris.txt")).to("mock:paris")


[2/3] camel git commit: CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.

Posted by da...@apache.org.
CAMEL-11446: Use awaitility in camel-core for testing where we otherwise use thred sleep which can be speeded up.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/76accb3a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/76accb3a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/76accb3a

Branch: refs/heads/master
Commit: 76accb3aa7bf087e8cfad2aa418a1e94c144477f
Parents: cc1edc9
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 8 12:29:44 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 8 12:29:44 2017 +0200

----------------------------------------------------------------------
 ...anChoseMethodWithMatchingTypeAndSkipSettersTest.java |  2 +-
 .../component/file/FileConsumePollEnrichFileTest.java   |  8 ++++----
 .../FileConsumePollEnrichFileUsingProcessorTest.java    |  4 ++--
 .../file/FileConsumerAbsolutePathDefaultMoveTest.java   |  2 +-
 .../component/file/FileConsumerAbsolutePathTest.java    |  2 +-
 .../FileConsumerAbsolutePathWithAbsoluteMoveTest.java   |  2 +-
 .../FileConsumerAbsolutePathWithRelativeMoveTest.java   |  2 +-
 .../FileConsumerAbsoluteRootPathDefaultMoveTest.java    |  2 +-
 .../camel/component/file/FileConsumerBatchTest.java     | 11 ++++++++---
 ...sumerBeginAndCommitExpressionRenameStrategyTest.java |  2 +-
 .../FileConsumerBeginAndCommitRenameStrategyTest.java   |  2 +-
 .../FileConsumerBeginExpressionRenameStrategyTest.java  |  2 +-
 .../file/FileConsumerBeginRenameStrategyTest.java       |  2 +-
 .../FileConsumerBridgeRouteExceptionHandlerTest.java    |  2 +-
 ...ileConsumerCommitRenameAbsolutePathStrategyTest.java |  2 +-
 .../file/FileConsumerCommitRenameStrategyTest.java      |  2 +-
 .../file/FileConsumerConsumedFileNameTest.java          |  8 +++++---
 .../file/FileConsumerCustomExceptionHandlerTest.java    |  2 +-
 .../component/file/FileConsumerCustomSchedulerTest.java |  4 ++--
 .../file/FileConsumerDeleteAndFailureTest.java          |  4 ++--
 .../file/FileConsumerDeleteAndMoveFailedTest.java       |  2 +-
 .../component/file/FileConsumerDirectoryFilterTest.java |  2 +-
 .../file/FileConsumerDirectoryNotMatchedTest.java       |  2 +-
 .../component/file/FileConsumerExcludeNameTest.java     |  2 +-
 .../file/FileConsumerExtendedAttributesTest.java        |  8 ++++----
 .../component/file/FileConsumerFailureHandledTest.java  |  2 +-
 .../component/file/FileConsumerFileExpressionTest.java  |  6 ++----
 .../component/file/FileConsumerFileFilterTest.java      |  7 +++----
 .../component/file/FileConsumerFilterDirectoryTest.java |  6 +++---
 .../component/file/FileConsumerFilterFileTest.java      |  8 +++-----
 .../FileConsumerIdempotentKeyChangedIssue2Test.java     |  9 ++++++---
 .../file/FileConsumerIdempotentKeyChangedIssueTest.java |  7 +++++--
 .../file/FileConsumerIdempotentKeyNameAndSizeTest.java  |  2 +-
 .../component/file/FileConsumerIdempotentKeyTest.java   |  2 +-
 .../component/file/FileConsumerIdempotentRefTest.java   |  2 +-
 .../component/file/FileConsumerIdempotentTest.java      |  2 +-
 .../component/file/FileConsumerIdleMessageTest.java     |  5 +++--
 .../file/FileConsumerIncludeAndExcludeNameTest.java     |  2 +-
 .../component/file/FileConsumerIncludeNameTest.java     |  2 +-
 .../file/FileConsumerInterceptEmptyFileTest.java        |  2 +-
 .../file/FileConsumerMoveAndMoveFailureTest.java        |  2 +-
 .../component/file/FileConsumerMoveExpressionTest.java  |  9 +++++----
 .../file/FileConsumerMoveFailureOnCompletionTest.java   |  2 +-
 .../component/file/FileConsumerMoveFailureTest.java     |  2 +-
 .../camel/component/file/GenericFileConverterTest.java  | 12 ++++++------
 .../MarkerFileExclusiveReadLockStrategyUnlockTest.java  |  4 ++--
 .../MarkerFileExclusiveReadLockStrategyTest.java        |  2 +-
 .../component/xslt/XsltCustomizeEntityResolverTest.java |  2 +-
 .../component/xslt/XsltCustomizeURIResolverTest.java    |  2 +-
 .../camel/component/xslt/XsltFromFileExceptionTest.java |  2 +-
 .../xslt/XsltIncludeClasspathDotInDirectoryTest.java    |  2 +-
 .../camel/component/xslt/XsltIncludeClasspathTest.java  |  2 +-
 .../xslt/XsltIncludeRelativeFileSchemeTest.java         |  2 +-
 .../component/xslt/XsltIncludeRelativeOtherTest.java    |  2 +-
 .../camel/component/xslt/XsltIncludeRelativeTest.java   |  2 +-
 .../apache/camel/component/xslt/XsltIncludeTest.java    |  2 +-
 .../camel/component/xslt/XsltMessageTerminateTest.java  |  2 +-
 57 files changed, 105 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
index 0344b7d..3e942dc 100644
--- a/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanChoseMethodWithMatchingTypeAndSkipSettersTest.java
@@ -78,7 +78,7 @@ public class BeanChoseMethodWithMatchingTypeAndSkipSettersTest extends ContextTe
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/file/order", "seda:xml")
+                from("file://target/file/order?initialDelay=0&delay=10", "seda:xml")
                     .bean("orderService")
                     .to("mock:queue:order");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/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 17536a8..3acc12f 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
@@ -40,8 +40,8 @@ public class FileConsumePollEnrichFileTest extends ContextTestSupport {
 
         template.sendBodyAndHeader("file://target/enrich", "Start", Exchange.FILE_NAME, "AAA.fin");
 
-        log.info("Sleeping for 0.5 sec before writing enrichdata file");
-        Thread.sleep(500);
+        log.info("Sleeping for 1/4 sec before writing enrichdata file");
+        Thread.sleep(250);
         template.sendBodyAndHeader("file://target/enrichdata", "Big file", Exchange.FILE_NAME, "AAA.dat");
         log.info("... write done");
 
@@ -53,9 +53,9 @@ public class FileConsumePollEnrichFileTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/enrich?move=.done")
+                from("file://target/enrich?initialDelay=0&delay=10&move=.done")
                     .to("mock:start")
-                    .pollEnrich("file://target/enrichdata?move=.done", 10000)
+                    .pollEnrich("file://target/enrichdata?initialDelay=0&delay=10&move=.done", 1000)
                     .to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileUsingProcessorTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileUsingProcessorTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileUsingProcessorTest.java
index 2661ac4..d0fa988 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileUsingProcessorTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumePollEnrichFileUsingProcessorTest.java
@@ -59,7 +59,7 @@ public class FileConsumePollEnrichFileUsingProcessorTest extends ContextTestSupp
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/enrich?move=.done")
+                from("file://target/enrich?initialDelay=0&delay=10&move=.done")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             String name = exchange.getIn().getHeader(Exchange.FILE_NAME_ONLY, String.class);
@@ -70,7 +70,7 @@ public class FileConsumePollEnrichFileUsingProcessorTest extends ContextTestSupp
                             ConsumerTemplate con = exchange.getContext().createConsumerTemplate();
                             try {
                                 // try to get the data file
-                                data = con.receive("file://target/enrichdata?move=.done&fileName=" + name, 5000);
+                                data = con.receive("file://target/enrichdata?initialDelay=0&delay=10&move=.done&fileName=" + name, 5000);
                             } finally {
                                 // stop the consumer as it does not need to poll for files anymore
                                 con.stop();

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
index bdd0302..0ab3201 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
@@ -50,7 +50,7 @@ public class FileConsumerAbsolutePathDefaultMoveTest extends ContextTestSupport
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file:" + base).convertBodyTo(String.class).to("mock:report");
+                from("file:" + base + "?initialDelay=0&delay=10").convertBodyTo(String.class).to("mock:report");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathTest.java
index ced6ef7..9549a72 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathTest.java
@@ -50,7 +50,7 @@ public class FileConsumerAbsolutePathTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://" + base + "?delete=true").convertBodyTo(String.class).to("mock:report");
+                from("file://" + base + "?initialDelay=0&delay=10&delete=true").convertBodyTo(String.class).to("mock:report");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithAbsoluteMoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithAbsoluteMoveTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithAbsoluteMoveTest.java
index 3a3c026..3c7dea8 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithAbsoluteMoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithAbsoluteMoveTest.java
@@ -51,7 +51,7 @@ public class FileConsumerAbsolutePathWithAbsoluteMoveTest extends ContextTestSup
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://" + base + "?move=" + base + "/done/${file:onlyname}").convertBodyTo(String.class).to("mock:report");
+                from("file://" + base + "?initialDelay=0&delay=10&move=" + base + "/done/${file:onlyname}").convertBodyTo(String.class).to("mock:report");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithRelativeMoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithRelativeMoveTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithRelativeMoveTest.java
index 8c17f7f..2cf2279 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithRelativeMoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathWithRelativeMoveTest.java
@@ -51,7 +51,7 @@ public class FileConsumerAbsolutePathWithRelativeMoveTest extends ContextTestSup
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://" + base + "?move=../done/${file:onlyname}").convertBodyTo(String.class).to("mock:report");
+                from("file://" + base + "?initialDelay=0&delay=10&move=../done/${file:onlyname}").convertBodyTo(String.class).to("mock:report");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
index 59e0241..7889832 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerAbsoluteRootPathDefaultMoveTest.java
@@ -51,7 +51,7 @@ public class FileConsumerAbsoluteRootPathDefaultMoveTest extends ContextTestSupp
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file:" + base).routeId("foo").noAutoStartup()
+                from("file:" + base + "?initialDelay=0&delay=10").routeId("foo").noAutoStartup()
                     .convertBodyTo(String.class).to("mock:report");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
index adddc0f..7d8f767 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
@@ -30,15 +30,14 @@ public class FileConsumerBatchTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/file-batch");
         super.setUp();
-        template.sendBodyAndHeader("file://target/file-batch/", "Hello World", Exchange.FILE_NAME, "hello.txt");
-        template.sendBodyAndHeader("file://target/file-batch/", "Bye World", Exchange.FILE_NAME, "bye.txt");
     }
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/file-batch?initialDelay=2000").convertBodyTo(String.class).to("mock:result");
+                from("file://target/file-batch?initialDelay=0&delay=10").noAutoStartup()
+                    .convertBodyTo(String.class).to("mock:result");
             }
         };
     }
@@ -47,11 +46,17 @@ public class FileConsumerBatchTest extends ContextTestSupport {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceivedInAnyOrder("Hello World", "Bye World");
 
+        template.sendBodyAndHeader("file://target/file-batch/", "Hello World", Exchange.FILE_NAME, "hello.txt");
+        template.sendBodyAndHeader("file://target/file-batch/", "Bye World", Exchange.FILE_NAME, "bye.txt");
+
         // test header keys
         mock.message(0).exchangeProperty(Exchange.BATCH_SIZE).isEqualTo(2);
         mock.message(0).exchangeProperty(Exchange.BATCH_INDEX).isEqualTo(0);
         mock.message(1).exchangeProperty(Exchange.BATCH_INDEX).isEqualTo(1);
 
+        // start routes
+        context.startAllRoutes();
+
         assertMockEndpointsSatisfied();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
index 6b9f830..fd37e92 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitExpressionRenameStrategyTest.java
@@ -63,7 +63,7 @@ public class FileConsumerBeginAndCommitExpressionRenameStrategyTest extends Cont
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak&move=../done/${file:name}&consumer.delay=5000")
+                from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak&move=../done/${file:name}&initialDelay=0&delay=10")
                         .process(new Processor() {
                             @SuppressWarnings("unchecked")
                             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
index be81fdc..f73102b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginAndCommitRenameStrategyTest.java
@@ -73,7 +73,7 @@ public class FileConsumerBeginAndCommitRenameStrategyTest extends ContextTestSup
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?preMove=../inprogress/${file:name}&move=../done/${file:name}&delay=5000")
+                from("file://target/reports?preMove=../inprogress/${file:name}&move=../done/${file:name}&initialDelay=0&delay=10")
                         .process(new Processor() {
                             @SuppressWarnings("unchecked")
                             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
index a906c17..4537d11 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginExpressionRenameStrategyTest.java
@@ -70,7 +70,7 @@ public class FileConsumerBeginExpressionRenameStrategyTest extends ContextTestSu
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak")
+                from("file://target/reports?preMove=../inprogress/${file:name.noext}.bak&initialDelay=0&delay=10")
                         .process(new Processor() {
                             @SuppressWarnings("unchecked")
                             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
index 3a4f0dd..092d82f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBeginRenameStrategyTest.java
@@ -70,7 +70,7 @@ public class FileConsumerBeginRenameStrategyTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?preMove=../inprogress/${file:name}&consumer.delay=5000")
+                from("file://target/reports?preMove=../inprogress/${file:name}&initialDelay=0&delay=10")
                         .process(new Processor() {
                             @SuppressWarnings("unchecked")
                             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
index 8259ec6..3e02e7c 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerBridgeRouteExceptionHandlerTest.java
@@ -66,7 +66,7 @@ public class FileConsumerBridgeRouteExceptionHandlerTest extends ContextTestSupp
 
                 // this is the file route that pickup files, notice how we bridge the consumer to use the Camel routing error handler
                 // the exclusiveReadLockStrategy is only configured because this is from an unit test, so we use that to simulate exceptions
-                from("file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&consumer.bridgeErrorHandler=true")
+                from("file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&consumer.bridgeErrorHandler=true&initialDelay=0&delay=10")
                     .convertBodyTo(String.class)
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameAbsolutePathStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameAbsolutePathStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameAbsolutePathStrategyTest.java
index 6e319d4..7515e4f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameAbsolutePathStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameAbsolutePathStrategyTest.java
@@ -52,7 +52,7 @@ public class FileConsumerCommitRenameAbsolutePathStrategyTest extends ContextTes
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?move=" + base + "/done/${file:name}&consumer.delay=5000")
+                from("file://target/reports?move=" + base + "/done/${file:name}&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:report");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
index b8fbeb8..b475509 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCommitRenameStrategyTest.java
@@ -76,7 +76,7 @@ public class FileConsumerCommitRenameStrategyTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/reports?move=../done/${file:name}&consumer.delay=5000")
+                from("file://target/reports?move=../done/${file:name}&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:report");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerConsumedFileNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerConsumedFileNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerConsumedFileNameTest.java
index 30de2ce..b1c2ac1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerConsumedFileNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerConsumedFileNameTest.java
@@ -30,8 +30,6 @@ public class FileConsumerConsumedFileNameTest extends ContextTestSupport {
     protected void setUp() throws Exception {
         deleteDirectory("target/consumedfilename");
         super.setUp();
-        // the file name is also starting with target/consumedfilename
-        template.sendBodyAndHeader("file:target/consumedfilename", "Hello World", Exchange.FILE_NAME, "hello.txt");
     }
 
     public void testValidFilenameOnExchange() throws Exception {
@@ -39,6 +37,10 @@ public class FileConsumerConsumedFileNameTest extends ContextTestSupport {
         mock.expectedMessageCount(1);
         mock.message(0).header(Exchange.FILE_NAME).isEqualTo("hello.txt");
         mock.message(0).header(Exchange.FILE_NAME_CONSUMED).isEqualTo("hello.txt");
+
+        // the file name is also starting with target/consumedfilename
+        template.sendBodyAndHeader("file:target/consumedfilename", "Hello World", Exchange.FILE_NAME, "hello.txt");
+
         assertMockEndpointsSatisfied();
     }
 
@@ -47,7 +49,7 @@ public class FileConsumerConsumedFileNameTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/consumedfilename").to("mock:result");
+                from("file:target/consumedfilename?initialDelay=0&delay=10").to("mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
index 071ac82..fb24f63 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
@@ -81,7 +81,7 @@ public class FileConsumerCustomExceptionHandlerTest extends ContextTestSupport {
 
                 // this is the file route that pickup files, notice how we use our custom exception handler on the consumer
                 // the exclusiveReadLockStrategy is only configured because this is from an unit test, so we use that to simulate exceptions
-                from("file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&consumer.exceptionHandler=#myExceptionHandler")
+                from("file:target/nospace?exclusiveReadLockStrategy=#myReadLockStrategy&consumer.exceptionHandler=#myExceptionHandler&initialDelay=0&delay=10")
                     .convertBodyTo(String.class)
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
index a466086..37bf863 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomSchedulerTest.java
@@ -63,7 +63,7 @@ public class FileConsumerCustomSchedulerTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/file/custom?scheduler=#myScheduler&scheduler.foo=bar").routeId("foo").noAutoStartup()
+                from("file:target/file/custom?scheduler=#myScheduler&scheduler.foo=bar&initialDelay=0&delay=10").routeId("foo").noAutoStartup()
                     .to("mock:result");
             }
         };
@@ -113,7 +113,7 @@ public class FileConsumerCustomSchedulerTest extends ContextTestSupport {
         @Override
         public void startScheduler() {
             timer = new Timer();
-            timer.schedule(timerTask, 100);
+            timer.schedule(timerTask, 10);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndFailureTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndFailureTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndFailureTest.java
index 91f1cb7..f4042ec 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndFailureTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndFailureTest.java
@@ -50,8 +50,8 @@ public class FileConsumerDeleteAndFailureTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                onException(IllegalArgumentException.class).useOriginalMessage().to("file://target/failed/error");
-                from("file://target/failed?delete=true")
+                onException(IllegalArgumentException.class).handled(true).useOriginalMessage().to("file://target/failed/error");
+                from("file://target/failed?delete=true&initialDelay=0&delay=10")
                     .setBody(simple("${body} IS processed!"))
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndMoveFailedTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndMoveFailedTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndMoveFailedTest.java
index 0309cd5..038c6e3 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndMoveFailedTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDeleteAndMoveFailedTest.java
@@ -30,7 +30,7 @@ public class FileConsumerDeleteAndMoveFailedTest extends FileConsumerDeleteAndFa
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/failed?delete=true&moveFailed=error")
+                from("file://target/failed?delete=true&moveFailed=error&initialDelay=0&delay=10")
                     .setBody(simple("${body} IS processed!"))
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
index 4d2d126..05375fb 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryFilterTest.java
@@ -32,7 +32,7 @@ import org.apache.camel.impl.JndiRegistry;
  */
 public class FileConsumerDirectoryFilterTest extends ContextTestSupport {
 
-    private final String fileUrl = "file://target/directoryfilter/?recursive=true&filter=#myFilter";
+    private final String fileUrl = "file://target/directoryfilter/?recursive=true&filter=#myFilter&initialDelay=0&delay=10";
     private final Set<String> names = new TreeSet<String>();
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryNotMatchedTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryNotMatchedTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryNotMatchedTest.java
index 2c960c4..1bb275c 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryNotMatchedTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerDirectoryNotMatchedTest.java
@@ -26,7 +26,7 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumerDirectoryNotMatchedTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/dirnotmatched/?recursive=true&include=.*txt$";
+    private String fileUrl = "file://target/dirnotmatched/?initialDelay=0&delay=10&recursive=true&include=.*txt$";
 
     @Override
     protected void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExcludeNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExcludeNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExcludeNameTest.java
index 030defe..6af4f54 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExcludeNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExcludeNameTest.java
@@ -49,7 +49,7 @@ public class FileConsumerExcludeNameTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/exclude/?exclude=^secret.*|.*xml$")
+                from("file://target/exclude/?initialDelay=0&delay=10&exclude=^secret.*|.*xml$")
                     .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
index 5ca4d4b..4e71532 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerExtendedAttributesTest.java
@@ -49,16 +49,16 @@ public class FileConsumerExtendedAttributesTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                fromF("file://%s/basic?extendedAttributes=basic:*", ROOT)
+                fromF("file://%s/basic?initialDelay=0&delay=10&extendedAttributes=basic:*", ROOT)
                     .convertBodyTo(String.class)
                     .to("mock:basic");
-                fromF("file://%s/basic-as-default?extendedAttributes=*", ROOT)
+                fromF("file://%s/basic-as-default?initialDelay=0&delay=10&extendedAttributes=*", ROOT)
                     .convertBodyTo(String.class)
                     .to("mock:basic-as-default");
-                fromF("file://%s/basic-as-default-with-filter?extendedAttributes=size,lastModifiedTime,lastAccessTime", ROOT)
+                fromF("file://%s/basic-as-default-with-filter?initialDelay=0&delay=10&extendedAttributes=size,lastModifiedTime,lastAccessTime", ROOT)
                     .convertBodyTo(String.class)
                     .to("mock:basic-as-default-with-filter");
-                fromF("file://%s/posix?extendedAttributes=posix:*", ROOT)
+                fromF("file://%s/posix?initialDelay=0&delay=10&extendedAttributes=posix:*", ROOT)
                     .convertBodyTo(String.class)
                     .to("mock:posix");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java
index 3ee0a1e..f79801d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFailureHandledTest.java
@@ -118,7 +118,7 @@ public class FileConsumerFailureHandledTest extends ContextTestSupport {
                 onException(ValidationException.class).handled(true).to("mock:invalid");
 
                 // our route logic to process files from the input folder
-                from("file:target/messages/input/?delete=true").
+                from("file:target/messages/input/?initialDelay=0&delay=10&delete=true").
                     process(new MyValidatorProcessor()).
                     to("mock:valid");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
index 0ddc412..22cbe83 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
@@ -56,7 +56,7 @@ public class FileConsumerFileExpressionTest extends ContextTestSupport {
             @Override
             public void configure() throws Exception {
                 from("file://target/filelanguage/bean/"
-                      + "?fileName=${bean:counter.next}.txt&delete=true").to("mock:result");
+                      + "?initialDelay=0&delay=10&fileName=${bean:counter.next}.txt&delete=true").to("mock:result");
             }
         });
         context.start();
@@ -64,7 +64,6 @@ public class FileConsumerFileExpressionTest extends ContextTestSupport {
         // we should only get one as we only poll a single file using the file expression
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Goodday World");
-        mock.setResultWaitTime(5000);
 
         assertMockEndpointsSatisfied();
     }
@@ -79,7 +78,7 @@ public class FileConsumerFileExpressionTest extends ContextTestSupport {
             public void configure() throws Exception {
                 // START SNIPPET: e1
                 from("file://target/filelanguage/date/"
-                      + "?fileName=myfile-${date:now:yyyyMMdd}.txt").convertBodyTo(String.class).to("mock:result");
+                      + "?initialDelay=0&delay=10&fileName=myfile-${date:now:yyyyMMdd}.txt").convertBodyTo(String.class).to("mock:result");
                 // END SNIPPET: e1
             }
         });
@@ -88,7 +87,6 @@ public class FileConsumerFileExpressionTest extends ContextTestSupport {
         // we should only get one as we only poll a single file using the file expression
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Goodday World");
-        mock.setResultWaitTime(5000);
 
         assertMockEndpointsSatisfied();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
index b62b025..acb8274 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
@@ -23,11 +23,11 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.JndiRegistry;
 
 /**
- * Unit test for  the file filter option
+ * Unit test for the file filter option
  */
 public class FileConsumerFileFilterTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/filefilter/?filter=#myFilter";
+    private String fileUrl = "file://target/filefilter/?initialDelay=0&delay=10&filter=#myFilter";
 
     @Override
     protected JndiRegistry createRegistry() throws Exception {
@@ -49,13 +49,12 @@ public class FileConsumerFileFilterTest extends ContextTestSupport {
         template.sendBodyAndHeader("file:target/filefilter/", "This is a file to be filtered",
             Exchange.FILE_NAME, "skipme.txt");
 
-        mock.setResultWaitTime(2000);
+        mock.setResultWaitTime(100);
         mock.assertIsSatisfied();
     }
 
     public void testFilterFilesWithARegularFile() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("Hello World");
 
         template.sendBodyAndHeader("file:target/filefilter/", "This is a file to be filtered",

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterDirectoryTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterDirectoryTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterDirectoryTest.java
index da9e022..36fb377 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterDirectoryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterDirectoryTest.java
@@ -22,11 +22,11 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
 /**
- * Unit test for  the filter file option
+ * Unit test for the filter file option
  */
 public class FileConsumerFilterDirectoryTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/filefilter/?recursive=true&filterDirectory=${header.CamelFileNameOnly.length()} > 4";
+    private String fileUrl = "file://target/filefilter/?initialDelay=0&delay=10&recursive=true&filterDirectory=${header.CamelFileNameOnly.length()} > 4";
 
     @Override
     protected void setUp() throws Exception {
@@ -43,7 +43,7 @@ public class FileConsumerFilterDirectoryTest extends ContextTestSupport {
         template.sendBodyAndHeader("file:target/filefilter/foo", "This is a file to be filtered",
             Exchange.FILE_NAME, "skipme.txt");
 
-        mock.setResultWaitTime(2000);
+        mock.setResultWaitTime(100);
         mock.assertIsSatisfied();
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterFileTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterFileTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterFileTest.java
index f2156cd..ec0e68a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterFileTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFilterFileTest.java
@@ -26,8 +26,8 @@ import org.apache.camel.component.mock.MockEndpoint;
  */
 public class FileConsumerFilterFileTest extends ContextTestSupport {
 
-    private String fileUrl = "file://target/filefilter/?filterFile=${bodyAs(String)} contains 'World'";
-    private String fileUrl2 = "file://target/filefilter/?filterFile=${file:modified} < ${date:now-2s}";
+    private String fileUrl = "file://target/filefilter/?initialDelay=0&delay=10&filterFile=${bodyAs(String)} contains 'World'";
+    private String fileUrl2 = "file://target/filefilter/?initialDelay=0&delay=10&filterFile=${file:modified} < ${date:now-2s}";
 
     @Override
     protected void setUp() throws Exception {
@@ -41,7 +41,7 @@ public class FileConsumerFilterFileTest extends ContextTestSupport {
 
         template.sendBodyAndHeader("file:target/filefilter/", "This is a file to be filtered", Exchange.FILE_NAME, "skipme.txt");
 
-        mock.setResultWaitTime(2000);
+        mock.setResultWaitTime(100);
         mock.assertIsSatisfied();
     }
 
@@ -58,9 +58,7 @@ public class FileConsumerFilterFileTest extends ContextTestSupport {
 
     public void testFilterFilesWithDate() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result2");
-        mock.expectedMessageCount(1);
         mock.expectedBodiesReceived("Something else");
-        mock.setResultMinimumWaitTime(1500);
 
         template.sendBodyAndHeader("file:target/filefilter/", "Something else", Exchange.FILE_NAME, "hello2.txt");
 

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssue2Test.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssue2Test.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssue2Test.java
index 57569b2..b84b8e4 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssue2Test.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssue2Test.java
@@ -31,6 +31,9 @@ public class FileConsumerIdempotentKeyChangedIssue2Test extends ContextTestSuppo
         getMockEndpoint("mock:file").expectedBodiesReceived("Hello World");
 
         template.sendBodyAndHeader(endpoint, "Hello World", Exchange.FILE_NAME, "hello.txt");
+
+        context.startAllRoutes();
+
         assertMockEndpointsSatisfied();
         oneExchangeDone.matches(5, TimeUnit.SECONDS);
 
@@ -38,7 +41,7 @@ public class FileConsumerIdempotentKeyChangedIssue2Test extends ContextTestSuppo
         getMockEndpoint("mock:file").expectedBodiesReceived("Hello World Again");
 
         // wait a bit to allow the consumer to poll once and see a non-changed file
-        Thread.sleep(250);
+        Thread.sleep(50);
 
         template.sendBodyAndHeader(endpoint, "Hello World Again", Exchange.FILE_NAME, "hello.txt");
 
@@ -50,10 +53,10 @@ public class FileConsumerIdempotentKeyChangedIssue2Test extends ContextTestSuppo
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                endpoint = endpoint("file:target/changed?noop=true&delay=100"
+                endpoint = endpoint("file:target/changed?noop=true&initialDelay=0&delay=10"
                         + "&idempotentKey=${file:name}-${file:size}-${file:modified}");
 
-                from(endpoint)
+                from(endpoint).noAutoStartup()
                     .convertBodyTo(String.class)
                     .to("log:file")
                     .to("mock:file");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssueTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssueTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssueTest.java
index 9430df1..adfda77 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssueTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyChangedIssueTest.java
@@ -31,6 +31,9 @@ public class FileConsumerIdempotentKeyChangedIssueTest extends ContextTestSuppor
         getMockEndpoint("mock:file").expectedBodiesReceived("Hello World");
 
         template.sendBodyAndHeader(endpoint, "Hello World", Exchange.FILE_NAME, "hello.txt");
+
+        context.startAllRoutes();
+
         assertMockEndpointsSatisfied();
         oneExchangeDone.matches(5, TimeUnit.SECONDS);
 
@@ -47,10 +50,10 @@ public class FileConsumerIdempotentKeyChangedIssueTest extends ContextTestSuppor
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                endpoint = endpoint("file:target/changed?noop=true&readLock=changed"
+                endpoint = endpoint("file:target/changed?noop=true&readLock=changed&initialDelay=0&delay=10&readLockCheckInterval=100"
                         + "&idempotentKey=${file:onlyname}-${file:size}-${date:file:yyyyMMddHHmmss}");
 
-                from(endpoint)
+                from(endpoint).noAutoStartup()
                     .convertBodyTo(String.class)
                     .to("log:file")
                     .to("mock:file");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyNameAndSizeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyNameAndSizeTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyNameAndSizeTest.java
index 1863999..4adc1b9 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyNameAndSizeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyNameAndSizeTest.java
@@ -29,7 +29,7 @@ public class FileConsumerIdempotentKeyNameAndSizeTest extends FileConsumerIdempo
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/idempotent/?idempotent=true&idempotentKey=${file:onlyname}-${file:size}&move=done/${file:name}&delay=10")
+                from("file://target/idempotent/?idempotent=true&idempotentKey=${file:onlyname}-${file:size}&move=done/${file:name}&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyTest.java
index 5624eb1..6253f5e 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentKeyTest.java
@@ -27,7 +27,7 @@ public class FileConsumerIdempotentKeyTest extends FileConsumerIdempotentTest {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/idempotent/?idempotent=true&idempotentKey=${file:onlyname}&move=done/${file:name}&delay=10")
+                from("file://target/idempotent/?idempotent=true&idempotentKey=${file:onlyname}&move=done/${file:name}&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
index 55a8089..6c238a6 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentRefTest.java
@@ -50,7 +50,7 @@ public class FileConsumerIdempotentRefTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/idempotent/?idempotent=true&idempotentRepository=#myRepo&move=done/${file:name}&delay=10")
+                from("file://target/idempotent/?idempotent=true&idempotentRepository=#myRepo&move=done/${file:name}&initialDelay=0&delay=10")
                         .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
index 7ae8b73..24c80b3 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
@@ -29,7 +29,7 @@ import org.apache.camel.processor.idempotent.MemoryIdempotentRepository;
  */
 public class FileConsumerIdempotentTest extends ContextTestSupport {
 
-    private String uri = "file://target/idempotent/?idempotent=true&move=done/${file:name}&delay=10";
+    private String uri = "file://target/idempotent/?idempotent=true&move=done/${file:name}&initialDelay=0&delay=10";
 
     @Override
     protected void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java
index 3667e7a..e6db558 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIdleMessageTest.java
@@ -30,17 +30,18 @@ public class FileConsumerIdleMessageTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/empty?delay=50&sendEmptyMessageWhenIdle=true").convertBodyTo(String.class).
+                from("file://target/empty?initialDelay=0&delay=10&sendEmptyMessageWhenIdle=true").convertBodyTo(String.class).
                     to("mock:result");
             }
         };
     }
 
     public void testConsumeIdleMessages() throws Exception {
-        Thread.sleep(110);
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(2);
+
         assertMockEndpointsSatisfied();
+
         assertTrue(mock.getExchanges().get(0).getIn().getBody() == null);
         assertTrue(mock.getExchanges().get(1).getIn().getBody() == null);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeAndExcludeNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeAndExcludeNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeAndExcludeNameTest.java
index b9ad5a2..ab154db 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeAndExcludeNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeAndExcludeNameTest.java
@@ -55,7 +55,7 @@ public class FileConsumerIncludeAndExcludeNameTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/includeexclude/?include=report.*txt&exclude=hello.*")
+                from("file://target/includeexclude/?initialDelay=0&delay=10&include=report.*txt&exclude=hello.*")
                     .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeNameTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeNameTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeNameTest.java
index c78b424..879e509 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeNameTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerIncludeNameTest.java
@@ -55,7 +55,7 @@ public class FileConsumerIncludeNameTest extends ContextTestSupport {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("file://target/include/?include=^report.*txt$")
+                from("file://target/include/?initialDelay=0&delay=10&include=^report.*txt$")
                     .convertBodyTo(String.class).to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerInterceptEmptyFileTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerInterceptEmptyFileTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerInterceptEmptyFileTest.java
index 1db81c0..37b283d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerInterceptEmptyFileTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerInterceptEmptyFileTest.java
@@ -57,7 +57,7 @@ public class FileConsumerInterceptEmptyFileTest extends ContextTestSupport {
             public void configure() throws Exception {
                 interceptFrom().when(simple("${file:length} == 0")).to("mock:skip").stop();
 
-                from("file://target/exclude/")
+                from("file://target/exclude/?initialDelay=10&delay=10")
                     .convertBodyTo(String.class).to("log:test").to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
index f410485..c2a2f82 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
@@ -51,7 +51,7 @@ public class FileConsumerMoveAndMoveFailureTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/failed?move=moved&moveFailed=error/${file:name.noext}-error.txt")
+                from("file://target/failed?move=moved&initialDelay=0&delay=10&moveFailed=error/${file:name.noext}-error.txt")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             String body = exchange.getIn().getBody(String.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
index f1ec5df..a91515d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveExpressionTest.java
@@ -52,7 +52,7 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filelanguage/?exclude=.*bak"
+                from("file://target/filelanguage/?initialDelay=0&delay=10&exclude=.*bak"
                         + "&move=${id}.bak").convertBodyTo(String.class).to("mock:result");
             }
         });
@@ -75,7 +75,7 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filelanguage/?exclude=.*bak"
+                from("file://target/filelanguage/?initialDelay=0&delay=10&exclude=.*bak"
                      + "&move=backup-${id}-${file:name.noext}.bak").convertBodyTo(String.class).to("mock:result");
             }
         });
@@ -98,7 +98,7 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filelanguage/?exclude=.*bak"
+                from("file://target/filelanguage/?initialDelay=0&delay=10&exclude=.*bak"
                       + "&move=backup/${bean:myguidgenerator.guid}.txt").convertBodyTo(String.class).to("mock:result");
             }
         });
@@ -116,7 +116,7 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/filelanguage/?exclude=.*bak"
+                from("file://target/filelanguage/?initialDelay=0&delay=10&exclude=.*bak"
                      + "&move=../backup/${file:name}.bak").to("mock:result");
             }
         });
@@ -141,6 +141,7 @@ public class FileConsumerMoveExpressionTest extends ContextTestSupport {
                 endpoint.setAutoCreate(false);
                 endpoint.setMove(BeanLanguage.bean("myguidgenerator"));
                 endpoint.setExclude(".*bak");
+                endpoint.setInitialDelay(10);
 
                 from(endpoint).to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureOnCompletionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureOnCompletionTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureOnCompletionTest.java
index 221378a..49e8d36 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureOnCompletionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureOnCompletionTest.java
@@ -64,7 +64,7 @@ public class FileConsumerMoveFailureOnCompletionTest extends ContextTestSupport
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/failed?moveFailed=error/${file:name.noext}-error.txt")
+                from("file://target/failed?initialDelay=0&delay=10&moveFailed=error/${file:name.noext}-error.txt")
                     .onCompletion().onFailureOnly().to("mock:failed").end()
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureTest.java b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureTest.java
index 1394477..c6de2eb 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveFailureTest.java
@@ -51,7 +51,7 @@ public class FileConsumerMoveFailureTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/failed?moveFailed=error/${file:name.noext}-error.txt")
+                from("file://target/failed?initialDelay=0&delay=10&moveFailed=error/${file:name.noext}-error.txt")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {
                             String body = exchange.getIn().getBody(String.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java b/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
index 7299d6f..b0c95c1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
@@ -47,7 +47,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(File.class)
                     .to("mock:result");
             }
@@ -67,7 +67,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(String.class)
                     .to("mock:result");
             }
@@ -88,7 +88,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(byte[].class)
                     .to("mock:result");
             }
@@ -109,7 +109,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(Serializable.class)
                     .to("mock:result");
             }
@@ -130,7 +130,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(InputStream.class)
                     .to("mock:result");
             }
@@ -151,7 +151,7 @@ public class GenericFileConverterTest extends ContextTestSupport {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file://target/gf")
+                from("file://target/gf?initialDelay=0&delay=10")
                     .convertBodyTo(InputStream.class)
                     .process(new Processor() {
                         @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/MarkerFileExclusiveReadLockStrategyUnlockTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/MarkerFileExclusiveReadLockStrategyUnlockTest.java b/camel-core/src/test/java/org/apache/camel/component/file/MarkerFileExclusiveReadLockStrategyUnlockTest.java
index b12b8b2..b4e1820 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/MarkerFileExclusiveReadLockStrategyUnlockTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/MarkerFileExclusiveReadLockStrategyUnlockTest.java
@@ -47,8 +47,8 @@ public class MarkerFileExclusiveReadLockStrategyUnlockTest extends ContextTestSu
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/marker-unlock/input-a?fileName=file1.dat&readLock=markerFile")
-                        .pollEnrich("file:target/marker-unlock/input-b?fileName=file2.dat&readLock=markerFile")
+                from("file:target/marker-unlock/input-a?fileName=file1.dat&readLock=markerFile&initialDelay=0&delay=10")
+                        .pollEnrich("file:target/marker-unlock/input-b?fileName=file2.dat&readLock=markerFile&initialDelay=0&delay=10")
                         .to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java b/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
index cebea69..8383415 100644
--- a/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
@@ -99,7 +99,7 @@ public class MarkerFileExclusiveReadLockStrategyTest extends ContextTestSupport
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/marker/in?readLock=markerFile")
+                from("file:target/marker/in?readLock=markerFile&initialDelay=0&delay=10")
                         .onCompletion()
                         .process(new Processor() {
                             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
index d37cc40..0cb66be 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeEntityResolverTest.java
@@ -45,7 +45,7 @@ public class XsltCustomizeEntityResolverTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=xml_with_entity.xml&noop=true").
+                from("file:src/test/data/?fileName=xml_with_entity.xml&noop=true&initialDelay=0&delay=10").
                 to("xslt:xslt/common/copy.xsl?allowStAX=false&output=string&entityResolver=#customEntityResolver").
                     to("mock:resultURIResolverDirect");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
index 959de9d..8b1a71b 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java
@@ -50,7 +50,7 @@ public class XsltCustomizeURIResolverTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/include_not_existing_resource.xsl?uriResolver=#customURIResolver")
                     .to("mock:resultURIResolverDirect");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java
index c98e775..e4875ed 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java
@@ -73,7 +73,7 @@ public class XsltFromFileExceptionTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:target/xslt?moveFailed=error&move=ok")
+                from("file:target/xslt?moveFailed=error&move=ok&initialDelay=0&delay=10")
                     .onException(Exception.class)
                         .to("mock:error")
                     .end()

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathDotInDirectoryTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathDotInDirectoryTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathDotInDirectoryTest.java
index 1acae1a..3fc2019 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathDotInDirectoryTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathDotInDirectoryTest.java
@@ -57,7 +57,7 @@ public class XsltIncludeClasspathDotInDirectoryTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:com.mycompany/staff_include_classpath2.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathTest.java
index 5b85ed6..2017010 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeClasspathTest.java
@@ -39,7 +39,7 @@ public class XsltIncludeClasspathTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/staff_include_classpath.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeFileSchemeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeFileSchemeTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeFileSchemeTest.java
index 20ceef8..a5f1f4c 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeFileSchemeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeFileSchemeTest.java
@@ -39,7 +39,7 @@ public class XsltIncludeRelativeFileSchemeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:file:src/test/resources/xslt/staff/staff.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeOtherTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeOtherTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeOtherTest.java
index 6b5771c..4724553 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeOtherTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeOtherTest.java
@@ -39,7 +39,7 @@ public class XsltIncludeRelativeOtherTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/staff_include_relative_other.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeTest.java
index 9c1df07..384ce6d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeRelativeTest.java
@@ -39,7 +39,7 @@ public class XsltIncludeRelativeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/staff_include_relative.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeTest.java
index 6a5e00a..0bd60d1 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltIncludeTest.java
@@ -39,7 +39,7 @@ public class XsltIncludeTest extends ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("file:src/test/data/?fileName=staff.xml&noop=true")
+                from("file:src/test/data/?fileName=staff.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/staff_include.xsl")
                     .to("log:foo")
                     .to("mock:result");

http://git-wip-us.apache.org/repos/asf/camel/blob/76accb3a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltMessageTerminateTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltMessageTerminateTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltMessageTerminateTest.java
index 3ccaa68..c19dc0a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltMessageTerminateTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltMessageTerminateTest.java
@@ -47,7 +47,7 @@ public class XsltMessageTerminateTest extends ContextTestSupport {
             public void configure() throws Exception {
                 errorHandler(deadLetterChannel("mock:dead"));
 
-                from("file:src/test/data/?fileName=terminate.xml&noop=true")
+                from("file:src/test/data/?fileName=terminate.xml&noop=true&initialDelay=0&delay=10")
                     .to("xslt:org/apache/camel/component/xslt/terminate.xsl")
                     .to("log:foo")
                     .to("mock:result");