davsclaus commented on code in PR #28039:
URL: https://github.com/apache/camel/pull/28039#discussion_r4306098676
##########
components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/FileDisruptorShutdownCompleteAllTasksTest.java:
##########
@@ -43,14 +43,14 @@ void testShutdownCompleteAllTasks() throws Exception {
template.sendBodyAndHeader(url, "E", Exchange.FILE_NAME, "e.txt");
// give it 20 seconds to shutdown
- context.getShutdownStrategy().setTimeout(20 * 100000);
+ context.getShutdownStrategy().setTimeout(20);
context.addRoutes(new RouteBuilder() {
@Override
public void configure() {
from(url).routeId("route1")
// let it complete all tasks during shutdown
-
.shutdownRunningTask(ShutdownRunningTask.CompleteAllTasks).to("log:delay").delay(1000)
+
.shutdownRunningTask(ShutdownRunningTask.CompleteAllTasks).to("log:delay").delay(1000).syncDelayed()
Review Comment:
Nit: a short comment would keep someone from dropping `syncDelayed()` later
as a cleanup.
```suggestion
// let it complete all tasks during shutdown
// sync delay so the poll thread routes the batch,
and files are still pending when the context stops
.shutdownRunningTask(ShutdownRunningTask.CompleteAllTasks).to("log:delay").delay(1000).syncDelayed()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]