apupier opened a new pull request, #30652: URL: https://github.com/apache/camel/pull/30652
JIRA: https://issues.apache.org/jira/browse/CAMEL-27426 (follow-up of CAMEL-27321) ## Problem `ReplyManagerStopCompletesRequestsTest.rejectedTimeoutTaskRunsInTheCallingThread` (camel-jms and camel-sjms) failed about 41% of the time with `ConditionTimeoutException` on `await().until(() -> evicted.get() == 3)`. ## Cause `t1`, `t2` and `t3` were registered with the same `blockOnce` runnable, so whichever exchange completed first blocked on the latch. The test relies on `t3` being rejected by the executor; a rejected timeout task runs in the calling thread, which is the timeout checker thread (`CorrelationTimeoutMap.submitEviction`). When `t3` completed before the executor thread had started `t1`, the checker thread blocked on the latch, could not evict the remaining entries, and `evicted` never reached 3. ## Fix Only block when running on the executor thread (`OnTimeoutAbort`), so the checker thread is never blocked. Test-only change, no production code touched. ## Verification - Without the fix, under CPU load (40 busy loops), the test failed 1 time in 8 runs with the same `ConditionTimeoutException` as in the JIRA. - With the fix, 11 consecutive runs passed under the same load, and the whole test class passes 6 times in a row in both modules. --- _IBM Bob 2.2.1 on behalf of @apupier_ -- 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]
