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

   ## Summary
   
   _Claude Code on behalf of Guillaume Nodet_
   
   Replace `Thread.sleep()` calls with 
[Awaitility](https://github.com/awaitility/awaitility)-based polling in 
camel-kafka test files to improve test reliability and reduce flakiness 
(SonarCloud rule S2925):
   
   - **KafkaProducerSaslAuthTypeIT**: Replace `Thread.sleep(2000)` before 
message consumption with `await().atMost(20, SECONDS).untilAsserted()` that 
polls until all expected messages arrive
   - **KafkaTransactionIT**: Replace manual polling loop with 
`Thread.sleep(100)` with `await().pollInterval(100, 
MILLISECONDS).untilAsserted()` for message latch countdown
   - **KafkaBatchingIntervalResetAfterIdleIT**: Replace 
`Thread.sleep(BATCHING_INTERVAL_MS + 600)` for idle period simulation with 
`await().pollDelay().untilAsserted()`
   
   All `Thread.sleep()` calls in `components/camel-kafka/src/test/` have been 
eliminated.
   
   ## Test plan
   
   - [x] Code compiles (`mvn clean install -Dquickly`)
   - [x] Code formatting verified (`mvn formatter:format impsort:sort` - no 
changes needed)
   - [ ] CI integration tests pass
   
   🤖 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