apupier opened a new pull request, #29518: URL: https://github.com/apache/camel/pull/29518
# Description Part of [CAMEL-25891](https://issues.apache.org/jira/browse/CAMEL-25891) (speed up the build of `camel-spring-xml`). Independent of #29515 and of the fork count discussion in #28303. `ContextTestSupport` and `SpringTestSupport` reduce the default poll timeout of the `seda` component to 10 ms ("make SEDA run faster"), but the 356 test classes creating their context with `SpringTestHelper.createSpringCamelContext` did not, so their seda consumers kept the default of 1000 ms. A `SedaConsumer` blocks in `queue.poll(pollTimeout)` and stopping the context waits for its threads to leave that poll. With several seda routes each test spent about 3 s in the shutdown of its `CamelContext` (e.g. `shutdown in 2s993ms` for `SpringDelayerTest`, whose test bodies take about 2 s). This PR sets the poll timeout to 10 ms before the context is started, as the other test support classes do. Test code only, one line. # Measurements `camel-spring-xml`, 1186 tests, 4 forks: | | before | after | |---|---|---| | wall time | ~130 s | ~105 s | | sum of class times | 435 s | 317 s | | context shutdowns >= 1 s | 71 (120 s) | 35 (50 s) | | `SpringDelayerTest` | 19 s | 3 s | All tests pass. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. (formatter/impsort run on the module; test code only) # AI-assisted contributions - [x] This PR was prepared with IBM Bob 2.2.1 (AI agent); the commit has the `Co-authored-by` trailer. _IBM Bob 2.2.1 on behalf of @apupier. This description was AI-generated; please verify._ -- 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]
