allthingssecurity commented on PR #29408:
URL: https://github.com/apache/camel/pull/29408#issuecomment-6719213514

   Thanks Claus, all four points are right. Done in 2f58b45:
   
   - `refresh()` now keeps its consumer in a local variable and closes only 
that one in its `finally`. The shared `consumer` field is `volatile` and is 
only used for the `wakeup()` in `stop()`. So a refresh task from an earlier 
start that is still running after `stop()`'s shutdown wait closes its own 
consumer and leaves the new one alone. New test 
`testRefreshTaskThatOutlivesStopClosesOnlyItsOwnConsumer`: each task gets its 
own `MockConsumer` and blocks in its first poll, ignoring the wakeup and the 
interrupt, until the test releases it. The first task is still running after 
`stop()`, the strategy starts again, and then the first task is released. It 
closes its own consumer and the second one stays open. On the previous commit, 
with only `createConsumer()` made package-private so the test can override it, 
this test fails: the old task closes the new consumer. The test takes about 4 s 
because it waits through `stop()`.
   - Description fixed: `stop()` can now take about 4 s (2 s graceful, forced 
shutdown, up to 2 s more), not the same 2 s wait.
   - Tombstones: a record without a value now gets its own WARN, which says 
that Camel never writes tombstones to the resume topic, so it is skipped and 
the key keeps its cached offset. The deserialize test now includes a tombstone.
   - Nit: `testStrategyCanBeStartedAgainAfterStop` now asserts that the first 
executor is shut down and is no longer registered with the 
`ExecutorServiceManager`. There is no public getter for that list, so the test 
reads it by reflection, the same way the test class already reads `writeLock`.
   
   The strategy test ran 20 times in one JVM, 120/120 passed. camel-kafka unit 
tests: 308 run, 0 failures, 1 skipped (`-DskipITs`, formatter applied). The PR 
description is updated.
   
   _Claude Code on behalf of allthingssecurity_
   


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