davsclaus commented on PR #26804: URL: https://github.com/apache/camel/pull/26804#issuecomment-5801344894
Addressed in `a2daa6da8cf0`, with one correction. **Javadoc double space** — correct, fixed. **"On delivery attempt" path not tested** — that part is not right: it is the *only* message those tests see. Printing what `RecordingLogger` captures in `FailedDeliveryOriginTest`: ``` Failed delivery for (MessageId: ... on ExchangeId: ...) at foo[throwException1] FailedDeliveryOriginTest:79. On delivery attempt: 0 caught: java.lang.IllegalArgumentException: Forced error ``` With `maximumRedeliveries(0)` the exchange still passes through `RedeliveryTask.handleException()` once and logs `On delivery attempt: 0`, so the re-ordered capture is exactly what those tests assert — it is why the test failed before the reorder. **But the gap next to it is real**, and thanks for pushing on it: neither test covered an actual *retry*, nor the `Exhausted after delivery attempt` branch. Worth noting for anyone writing a similar test — a dead letter channel emits only the attempt messages through the error handler's logger; the exhausted message needs the default error handler. So `FailedDeliveryOriginRedeliveryTest` uses `defaultErrorHandler().maximumRedeliveries(1)`, which produces all three, and asserts every one names the route, node and source location: ``` ... at foo[throwException1] ...:87. On delivery attempt: 0 caught: ... ... at foo[throwException1] ...:87. On delivery attempt: 1 caught: ... ... at foo[throwException1] ...:87. Exhausted after delivery attempt: 2 caught: ... ``` 457 tests in camel-core (`*OnException*`, `*DeadLetter*`, `*Redeliver*`, `FailedDeliveryOrigin*`) pass. -- 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]
