Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void testConsumeAndDelete() throws Exception {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
from(fileUri("?initialDelay=0&delay=10&fileName=" + TEST_FILE_NAME_1 + "&delete=true"))
from(fileUri("?initialDelay=0&delay=2000&fileName=" + TEST_FILE_NAME_1 + "&delete=true"))
.convertBodyTo(String.class).to("mock:result");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void testNonRecursive() throws Exception {
@Override
public void configure() {
from(fileUri(
"d1?fileName=d1.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=10"))
"d1?fileName=d1.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=2000"))
.to("mock:result");
}
});
Expand All @@ -78,7 +78,7 @@ public void testRecursiveSingleDepth() throws Exception {
@Override
public void configure() {
from(fileUri(
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=10&recursive=true&minDepth=2&maxDepth=2"))
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=2000&recursive=true&minDepth=2&maxDepth=2"))
.to("mock:result");
}
});
Expand All @@ -104,7 +104,7 @@ public void testRecursiveRange() throws Exception {
@Override
public void configure() {
from(fileUri(
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=10&recursive=true&minDepth=2&maxDepth=4"))
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=2000&recursive=true&minDepth=2&maxDepth=4"))
.to("mock:result");
}
});
Expand All @@ -129,7 +129,7 @@ public void testRecursiveRangeAntInclude() throws Exception {
@Override
public void configure() {
from(fileUri(
"d1?antInclude=**/*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=10&recursive=true&minDepth=2&maxDepth=4"))
"d1?antInclude=**/*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=2000&recursive=true&minDepth=2&maxDepth=4"))
.to("mock:result");
}
});
Expand All @@ -154,7 +154,7 @@ public void testRecursive() throws Exception {
@Override
public void configure() {
from(fileUri(
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=10&recursive=true"))
"d1?include=.*.dat&readLock=markerFile&readLockDeleteOrphanLockFiles=true&initialDelay=0&delay=2000&recursive=true"))
.to("mock:result");
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
from(fileUri("input-a?fileName=file1.dat&readLock=markerFile&initialDelay=0&delay=10"))
.pollEnrich(fileUri("input-b?fileName=file2.dat&readLock=markerFile&initialDelay=0&delay=10"))
from(fileUri("input-a?fileName=file1.dat&readLock=markerFile&initialDelay=0&delay=2000"))
.pollEnrich(fileUri("input-b?fileName=file2.dat&readLock=markerFile&initialDelay=0&delay=2000"))
.to("mock:result");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
from(fileUri("in?readLock=markerFile&initialDelay=0&delay=10")).onCompletion()
from(fileUri("in?readLock=markerFile&initialDelay=0&delay=2000")).onCompletion()
.process(new Processor() {
public void process(Exchange exchange) {
numberOfFilesProcessed.addAndGet(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class FileSedaShutdownCompleteAllTasksTest extends ContextTestSupport {

@Test
public void testShutdownCompleteAllTasks() throws Exception {
String url = fileUri("?initialDelay=0&delay=10");
String url = fileUri("?initialDelay=0&delay=2000");

// prepare 5 files to begin with
template.sendBodyAndHeader(url, "A", Exchange.FILE_NAME, "a.txt");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
// use end to indicate end of multicast route
.end().to("mock:result");

from("direct:a").delay(2000).asyncDelayed().setBody(constant("A"));
from("direct:a").delay(2000).syncDelayed().setBody(constant("A"));

from("direct:b").setBody(constant("B"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public void testMulticastParallelStreamingTimeout() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
// A will timeout so we only get B and C (C is faster than B)
mock.expectedBodiesReceived("CB");
mock.setResultWaitTime(20000);

template.sendBody("direct:start", "Hello");

Expand All @@ -54,11 +55,11 @@ public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
oldExchange.getIn().setBody(body + newExchange.getIn().getBody(String.class));
return oldExchange;
}
}).parallelProcessing().streaming().timeout(5000).to("direct:a", "direct:b", "direct:c")
}).parallelProcessing().streaming().timeout(10000).to("direct:a", "direct:b", "direct:c")
// use end to indicate end of multicast route
.end().to("mock:result");

from("direct:a").delay(10000).setBody(constant("A"));
from("direct:a").delay(20000).setBody(constant("A"));

from("direct:b").delay(500).setBody(constant("B"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public void testCreateOutputStreamCacheAfterTimeout() throws Exception {
@Test
public void testCreateOutputStreamCacheBeforeTimeoutButWriteToOutputStreamCacheAfterTimeout() throws Exception {
getMockEndpoint("mock:exception").expectedMessageCount(1);
getMockEndpoint("mock:exception").setResultWaitTime(15000);
getMockEndpoint("mock:y").expectedMessageCount(0);
getMockEndpoint("mock:y").setAssertPeriod(2000);

template.sendBody("direct:b", "testMessage");
assertMockEndpointsSatisfied();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public void configure() {

from("direct:streaming").recipientList(header("foo")).parallelProcessing().streaming().to("mock:result");

from("direct:a").delay(100).transform(constant("a"));
from("direct:b").delay(500).transform(constant("b"));
from("direct:a").delay(100).syncDelayed().transform(constant("a"));
from("direct:b").delay(500).syncDelayed().transform(constant("b"));
from("direct:c").transform(constant("c"));
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
disabledReason = "This test does not run reliably on s390x (see CAMEL-21438)")
public class ShutdownCompleteCurrentTaskOnlyTest extends ContextTestSupport {

public static final String FILE_QUERY = "?initialDelay=0&delay=10&synchronous=true";
public static final String FILE_QUERY = "?initialDelay=0&delay=2000&synchronous=true";

@Override
@BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void configure() {
.to("mock:input")
.aggregate(header("id"), new BodyInAggregatingStrategy())
.aggregationRepository(new MemoryAggregationRepository())
.completionSize(2).completionTimeout(100).completeAllOnStop().completionTimeoutCheckerInterval(10)
.completionSize(2).completionTimeout(5000).completeAllOnStop().completionTimeoutCheckerInterval(10)
.to("mock:aggregated");
}
};
Expand Down