gnodet commented on PR #29450:
URL: https://github.com/apache/camel/pull/29450#issuecomment-6766988247
Thanks @Croway — all points addressed in commit `4c874bc`:
**1. CAMEL-26696 hang is in CXF 4.2.4 (CXF-9272), not in
`CxfClientCallback`** — the PR description already reflects this is hardening.
The CXF bug (reported to CXF as CXF-9272) is tracked separately.
**2. `done` called twice + silent cookie exception** — added an
`AtomicBoolean doneFired` guard in a new `signalDone()` helper. Even if CXF
calls both `handleResponse` and `handleException` on the same callback (e.g.
`ClientImpl.onMessage` catches a rethrown exception), `done(false)` now fires
exactly once. The cookie store exception path was already caught as of the
previous commit; the guard closes the residual race.
**3. `handleException` loses original exception when both conduit message
lookups return null** — fixed: `conduitSelector` branch now falls back to the
original `ex` parameter when neither message carries a resolved exception
(`camelExchange.setException(resolved != null ? resolved : ex)`). Previously,
if both lookups returned null, nothing was set on the exchange.
**4. Unit test gaps** — addressed:
- Migrated all assertions from AssertJ to JUnit
(`assertEquals`/`assertSame`) to match the module style (52 files use JUnit vs
2 AssertJ before this PR).
- Added `verify(camelExchange).setException(transportEx)` in
`handleException_normalPath` to actually assert the exception is set (not just
inferred from stub state).
- Added two new `ConduitSelector` branch tests: one verifying the
resolved exception from `outMessage` takes priority, one verifying the fallback
to the original `ex` when both message lookups return null.
- Added `doneFiredOnlyOnce_whenHandleExceptionCalledAfterHandleResponse`
to directly cover the double-done scenario.
**5. Missing `synchronous=true` comment** — restored above
`getWrongEndpointUri()` referencing CAMEL-26600 and CAMEL-26696.
13 unit tests all pass locally.
_Hermes Agent (Claude Sonnet 4.6) on behalf of 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]