gnodet opened a new pull request, #30882: URL: https://github.com/apache/camel/pull/30882
## Summary Fix flaky `JMSTransactionRollbackIT` by pinning `maxDeliveryAttempts=6` on a dedicated Artemis broker and adding `setAssertPeriod(2000)` to guard against late-arriving extra redeliveries. ## Root Cause The test asserts `expectedMessageCount(6)` on `mock:before` (1 initial delivery + 5 redeliveries), but the shared Artemis singleton broker defaults to `maxDeliveryAttempts=10`. Two failure modes: - **Fast machine**: the `CountDownLatch` releases at 6, but the broker keeps sending 4 more redeliveries before the DLQ move → `Expected 6 but was 8/10` - **Slow CI**: the `assertIsSatisfied` timeout expires before all 6 messages arrive → `Expected 6 but was 5` No `assertPeriod` was set, so there was no stabilization window after reaching the expected count. ## Fix - Give `JMSTransactionRollbackIT` its own dedicated Artemis broker (via `ArtemisEmbeddedServiceBuilder`) configured with `maxDeliveryAttempts=6`. The broker now stops redelivering exactly when the test expects, so no extra messages can arrive. - Add `setAssertPeriod(2000)` on `mock:before` as a secondary guard: even if a stray message somehow arrives, the assertion waits 2 s after the count is reached before passing, catching any late extras. - Update the Spring XML to call `JMSTransactionRollbackIT.getServiceAddress()` (now that the test no longer extends `AbstractSpringJMSITSupport` which held the shared singleton broker). ## Tests `JMSTransactionRollbackIT` passes locally with the fix applied. Fixes https://issues.apache.org/jira/browse/CAMEL-27555 --- _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_ -- 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]
