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

   @davsclaus thanks, all in 7020ae1c2a70:
   
   - Context stop: `doStop` now closes the handle when `connectCount == 0 || 
getCamelContext().isStopping()`. The route inputs and in-flight exchanges are 
done before the endpoints stop.
     - As I wrote on #28707, a `createProducerTemplate()` template's singleton 
producer is registered with `addService(producer, true, true)`, so Camel stops 
it after the endpoints and its last disconnect closes the handle anyway.
     - The change covers a producer or consumer that the application created 
and started itself. New test 
`stopCamelClosesTheHandleThatAProducerNotStoppedByCamelStillUses`, which fails 
without `isStopping()`.
     - A later disconnect closes the handle a second time, which is harmless: a 
closed `JChannel` ignores it, and the log close has its own try/catch.
   - Test seam: `resolveHandle()` is now package-private, like 
`resolveChannel()` in camel-jgroups. `JGroupsRaftEndpointCloseTest` builds the 
endpoint with no `raftHandle` and overrides `resolveHandle()`, so 
`setRaftHandle(null)` is gone.
   - `removeConsumerRouteThenAddItAgainKeepsTheHandle`: after the re-add it 
waits for a leader and does a `set` through `direct:a` on the kept handle, then 
checks the headers. The consumer only emits role-change events, which need an 
election, so the `set` is the deterministic check.
   - One Processor style: lambdas only.
   
   camel-jgroups-raft: 25 tests, 0 failures. Both changed test classes passed 
20 runs in one JVM. PR body updated to match.
   
   _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