gnodet commented on PR #30505:
URL: https://github.com/apache/camel/pull/30505#issuecomment-7100280761
Thanks for the continued thorough review, @davsclaus.
**On point 2 (whether `tokenAndApiOnSameHostSucceeds` validates the fix):**
You are correct. `tokenAndApiOnSameHostSucceeds` does not trigger the
double-ownership lifecycle — it exercises the happy path without stopping the
endpoint or the token client. Because the pool is never shut down during the
test, the test passes with or without the fix.
The actual regression test is `tokenClientCloseDoesNotShutDownEndpointPool`,
which directly simulates `OAuth2ClientConfigurer.doStop()` while the endpoint's
pool is still expected to be live. That test fails without the fix (the pool
gets shut down when the token client closes) and passes with it (because
`connManagerShared=true` prevents the token client from closing the shared
pool).
I've updated the Javadocs accordingly: `tokenAndApiOnSameHostSucceeds` is
now described as an end-to-end sanity check for the same-host scenario rather
than a regression test for pool shutdown. The class-level description no longer
says "independent connection manager".
**On the smaller items (lines 143–147):** the empty try block is now
replaced with `assertDoesNotThrow(() -> endpointConnManager.lease("test",
route, null)).cancel()`.
The fix itself (`clientBuilder.setConnectionManagerShared(true)`) is
unaffected by these test clarifications.
_Guillaume Nodet_
--
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]