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

   ## Summary
   
   _Claude Code on behalf of @squakez_
   
   Fix flaky `CxfConsumerPayLoadFaultMessageTest` in `camel-cxf-soap` that 
failed intermittently on JDK 25.
   
   - **Root cause**: `CxfConsumer.extractFromBody()` only checked `body 
instanceof Throwable` to detect faults. When a route sets a `CxfPayload` 
containing a raw `<soap:Fault>` XML element directly on the message body (as in 
`CxfConsumerPayLoadFaultMessageTest`), the fault was not detected and went 
through CXF's normal response serialization path instead of the fault handling 
path, leading to intermittent failures depending on CXF's internal 
serialization behavior.
   - **Fix**: Enhanced `extractFromBody()` to also detect `CxfPayload` bodies 
containing SOAP Fault elements. Added `extractFaultFromPayload()` which checks 
for a single Element body with localName "Fault" in SOAP 1.1 or 1.2 namespace, 
extracts `faultcode`/`faultstring`/`detail`, and constructs a proper 
`SoapFault` that CXF can process through its standard fault handling pipeline.
   - **Testing**: All 161 tests in `camel-cxf-soap` pass (0 failures, 2 
skipped). The specific test was run 5 additional times in isolation with 0 
failures.
   
   **Failed CI run**: 
https://github.com/apache/camel/actions/runs/28705613039/job/85141928674
   
   ## Test plan
   
   - [x] `CxfConsumerPayLoadFaultMessageTest` passes consistently (5/5 isolated 
runs)
   - [x] `CxfConsumerPayloadFaultTest` (parent, uses `setException`) still 
passes
   - [x] `CxfConsumerPayLoadMarshalFaultTest` (uses `SoapFault` as body) still 
passes
   - [x] Full `camel-cxf-soap` test suite passes (161 tests, 0 failures)
   - [ ] CI build passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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