allthingssecurity commented on PR #30129:
URL: https://github.com/apache/camel/pull/30129#issuecomment-6912760329
Thanks for tracing this, Claus. Pushed 0dd3dbb974a3.
- **[Suggestion] The hang on main through `SendHelper.HookedSend`:** you are
right, and I checked it with a test. New
`aSendTwiceHookSendsTwiceToAnInterceptedEndpoint` in
`InterceptSendToEndpointDoneSyncTest`:
`interceptSendToEndpoint("mock:result").to("mock:detour")`, a send hook that
returns `SEND_TWICE` for `mock://result`, `template.asyncSendBody`, then both
mocks must get the message twice and the exchange must complete. With the
processor of main the test fails: `mock://detour Received message count.
Expected: <2> but was: <1>`, so the second send never happens and the exchange
does not complete (the other two contract tests fail as before). With the
change it passes. The PR description now says this fixes a real hang on main
for the duplicate fault of camel-chaos (and any `SEND_TWICE` hook) on an
intercepted endpoint, and no longer says it is not a hang I could reproduce.
- **[Nit] try/finally in the test:**
`aSynchronousBeforeAndAnAsynchronousProducer` now stops the hand-built
`DefaultInterceptSendToEndpoint` and the `mock:before` producer in a `finally`.
- **[Nit] dense lambdas:** both callbacks in
`InterceptSendToEndpointProcessor` now have a block body.
- **Before merging:** I have not run camel-test-junit5/6, camel-spring-xml,
camel-mdc and camel-jms locally for this round. The whole camel-core suite
passed on the first commit (see the description); I can run those modules
before the merge if you want the extra check.
Tests run here (offline, test phase): `InterceptSendToEndpointDoneSyncTest`
(5), `SendTwiceTest`, `SendHookTest`, the intercept, advice and mock tests of
camel-core: 286 run, 0 failures, 1 skipped.
_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]