Croway opened a new pull request, #2109:
URL: https://github.com/apache/camel-spring-boot/pull/2109

   ## Summary
   
   Camel-Spring-Boot Daily `camel-spring-boot-4.22.x` #67 was UNSTABLE because 
`KafkaConsumerFullIT.kafkaMessageIsConsumedByCamel` received 0 of the expected 
5 messages (`mock://result Received message count. Expected: <5> but was: <0>`).
   
   This backports the `KafkaConsumerFullIT` part of #2031 (6826529ca36 on 
`main`), which was never applied to 4.22.x. The rest of that commit is not 
needed: `KafkaShareConsumerIT` does not exist on this branch.
   
   ### Root cause
   
   All tests in the class share the `test-full` topic. The `@AfterEach` fired 
`kafkaAdminClient.deleteTopics(...).all()` without waiting on the future. The 
test that runs just before `kafkaMessageIsConsumedByCamel` is 
`kafkaRecordSpecificHeadersAreNotOverwritten` (`@Order(2)`), so the topic could 
still be in the middle of deletion when the 5 records were produced. The 
consumer then received nothing.
   
   ### Changes
   
   `KafkaConsumerFullIT`, identical to the change on `main`:
   
   - `@AfterEach` waits up to 60s for the topic deletion to complete.
   - Each run gets a unique topic name and route ID, as in the apache/camel 
CAMEL-19358 fix.
   - `MockEndpoint.assertIsSatisfied(30, TimeUnit.SECONDS, to)` is used where 
messages are expected. `to.assertIsSatisfied(3000)` only applies its timeout to 
endpoints expecting zero messages, so it waited the default 10s.
   
   ### Testing
   
   Ran `KafkaConsumerFullIT` 3 times locally on this branch against the Kafka 
testcontainer (`-Dci.env.name=apache.org -Dit.test=KafkaConsumerFullIT`). All 5 
tests passed each time. The original failure is intermittent (Daily #61–#66 
were green), so the next Daily runs will confirm the fix.
   
   _Claude Code (Claude Opus 5.5) on behalf of Federico Mariani_
   


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