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

   Fixes [CAMEL-26638](https://issues.apache.org/jira/browse/CAMEL-26638).
   
   
`HazelcastReliableTopicConsumerLossTest.listenerCancelledByHazelcastIsReported` 
failed on all 3 surefire attempts in the CI build of #28874 (which only touched 
camel-core tests and camel-jbang), while it passes locally.
   
   ## Why it is flaky
   
   The test destroys the reliable topic right after the route starts, and waits 
for the consumer to report that Hazelcast cancelled its listener. In Hazelcast 
5.4, destroying the topic cancels only the operations that are **parked** at 
that moment (`ProxyServiceImpl` cancels them with a 
`DistributedObjectDestroyedException`, and `MessageRunner` then cancels the 
listener). When the first `readManyAsync` of the listener has not reached the 
member yet, it runs after the destroy, finds no ringbuffer, and parks on a new 
empty one. The listener is never cancelled, so nothing is reported.
   
   Checked locally with a throwaway probe (not committed): stop the route, 
destroy the topic, start the route. After 2 seconds nothing is reported; a 
second destroy cancels the listener and the report comes.
   
   ## Fix
   
   The test destroys the topic again, every 200 ms, until the consumer reports 
it, so a read that came in after a destroy is cancelled by the next one. The 
assertions (exactly one report, with the expected message) are unchanged. No 
change to the consumer.
   
   ## Tests
   
   `HazelcastReliableTopicConsumerLossTest`: 5 runs of the class, 4 tests each, 
0 failures.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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