gnodet opened a new pull request, #24954:
URL: https://github.com/apache/camel/pull/24954

   ## Summary
   
   _Claude Code on behalf of gnodet_
   
   Fix flaky `CxfTimeoutTest` in `camel-cxf-spring-soap` by checking the full 
exception cause chain for `HttpTimeoutException` instead of only the top-level 
exception.
   
   ## Root Cause Analysis
   
   The test configures a 100ms `ReceiveTimeout` via `*.http-conduit` XML 
configuration and expects a `java.net.http.HttpTimeoutException` when calling a 
server that sleeps 2000ms. The timeout **is** applied correctly — the flakiness 
is in how CXF propagates the exception.
   
   CXF's interceptor chain may either:
   1. **Propagate `HttpTimeoutException` directly** — test passes
   2. **Wrap it in `org.apache.cxf.interceptor.Fault: Could not send 
Message.`** with `HttpTimeoutException` as the cause — test fails
   
   Which path occurs depends on timing within CXF's interceptor chain. The 
original assertion only checked `e instanceof HttpTimeoutException` on the 
top-level exception, so case 2 caused assertion failures.
   
   **Develocity CI data (269 runs, 10-day window):**
   - `testInvokingFromCamelRoute`: 7 failures (2.6%)
   - `testInvokingJaxWsServerWithCxfEndpoint`: 1 failure (0.37%)
   - `testInvokingJaxWsServerWithBusUriParams`: 1 failure (0.37%)
   - Methods without SSL params or with explicit 60s timeout: 0 failures
   
   ## Changes
   
   Modified `sendTimeOutMessage()` to walk the exception cause chain via a 
`hasHttpTimeoutException()` helper, accepting `HttpTimeoutException` at any 
nesting level. Both the direct and Fault-wrapped forms correctly indicate the 
timeout was enforced.
   
   ## Test plan
   
   - [x] Ran `CxfTimeoutTest` 10 consecutive times locally — all passed (0 
failures)
   - [ ] CI build passes


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