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:05 UTC
[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.
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");