Croway opened a new pull request, #30721: URL: https://github.com/apache/camel/pull/30721
Follow-up of #30713 (CAMEL-27470), for the points of [the review](https://github.com/apache/camel/pull/30713#pullrequestreview-6039186990) that were not addressed before the merge. It is filed under CAMEL-27515, but it does not fix CAMEL-27515 itself, which needs a decision on CAMEL-27469 first. ## Changes - **`sendTimerExchange` no longer releases the exchange when an `Error` escapes the route.** This reverts the `finally` that #30713 added. Its comment said it prevents the exchange from staying inflight, but it doesn't: - `releaseExchange` gives the exchange back to the exchange factory, and the default `PrototypeExchangeFactory.release()` only counts it. - The inflight entry stayed, and stopping the route still waited for the shutdown timeout. - With the pooled exchange factory, it reset an exchange that the route can still use. After a `VirtualMachineError`, the next step of the route stays queued on the thread and runs later on the next exchange of that thread (CAMEL-27515). That step then got an empty message. - The new `TimerPooledExchangeVirtualMachineErrorTest` fails with the `finally` (`expected: <kept> but was: <null>`). - **Both fatal ERROR lines name the route id.** Routes can share a timer uri, as in the test, and this line is the only sign that the route must be restarted. - **`TimerNegativeDelayVirtualMachineErrorTest` asserts the ERROR line**, as gnodet-bot suggested. The latch of the merged test opened before the throw, so the test passed without the fix. - **`TimerVirtualMachineErrorTest` also checks that the failed route stops firing** while the other route keeps firing, and that it fires again once restarted. Before, it also passed without the `cancel()`. ## Tests - Each of the three tests fails without its part of the fix. I checked this by putting back the merged `finally`, and by removing the `cancel()` and the catch of the executor path. - The 35 timer tests of camel-core pass. _Claude Code on behalf of Croway_ -- 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]
