apupier opened a new pull request, #30500:
URL: https://github.com/apache/camel/pull/30500

   ## Summary
   
   Fixes flakiness of `JmsInOutRoutingSlipTest` (CAMEL-27252), which fails 
about 6% of the time on Develocity with `mock:JmsInOutRoutingSlipTest.foo 
Received message count. Expected: <1> but was: <0>`.
   
   ## Root cause
   
   `JmsInOutRoutingSlipTest` and `JmsMessageHeaderContentBasedRouterTest` both 
consume from `activemq:queue:JmsInOutRoutingSlipTest.start` on the shared 
singleton Artemis broker. Surefire runs these classes in parallel, so the 
consumer of the other test can receive the routing slip message. The message 
never reaches `foo`, and the assertion fails.
   
   ## Fix
   
   Both tests now use `AbstractJMSTest.queueNameForClass()` to get a 
class-scoped start queue, following the convention used by `BrowsableQueueTest` 
and the CAMEL-25234 fix. The change is test-only.
   
   I also checked the other queue names shared across camel-jms test files. The 
remaining overlaps are either `not-parallel`, `@Isolated`, or producer-only, so 
they are not affected.
   
   ## Validation
   
   - `mvn formatter:format impsort:sort` is clean.
   - `JmsInOutRoutingSlipTest` (5 repetitions) and 
`JmsMessageHeaderContentBasedRouterTest` pass together in 
`components/camel-jms`.
   - The race did not reproduce on demand locally, so the fix is based on the 
shared-queue analysis rather than a reproduction.
   
   _Claude Code on behalf of Aurélien Pupier_
   


-- 
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]

Reply via email to