Skip to content

Commit

Permalink
Flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Sep 29, 2024
1 parent 4482328 commit b0d1a4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
return oldExchange;
}
}).aggregationRepository(getAggregationRepository())
.completionSize(10).completionTimeout(200).completionTimeoutCheckerInterval(10).to("log:aggregated")
.completionSize(10).completionTimeout(500).completionTimeoutCheckerInterval(100).to("log:aggregated")
.to("mock:result");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class PollEnrichFileDefaultAggregationStrategyTest extends ContextTestSup

@Test
public void testPollEnrichDefaultAggregationStrategyBody() throws Exception {

getMockEndpoint("mock:start").expectedBodiesReceived("Start");

MockEndpoint mock = getMockEndpoint("mock:result");
Expand All @@ -37,6 +36,8 @@ public void testPollEnrichDefaultAggregationStrategyBody() throws Exception {
template.sendBodyAndHeader(fileUri("enrich"), "Start",
Exchange.FILE_NAME, "AAA.fin");

context.getRouteController().startAllRoutes();

log.info("Sleeping for 0.25 sec before writing enrichdata file");
Thread.sleep(250);
template.sendBodyAndHeader(fileUri("enrichdata"), "Big file",
Expand All @@ -53,7 +54,7 @@ protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
from(fileUri("enrich?initialDelay=0&delay=10&move=.done"))
from(fileUri("enrich?initialDelay=0&delay=10&move=.done")).autoStartup(false)
.to("mock:start")
.pollEnrich(
fileUri("enrichdata?initialDelay=0&delay=10&readLock=markerFile&move=.done"),
Expand Down

0 comments on commit b0d1a4b

Please sign in to comment.