davsclaus commented on PR #26802:
URL: https://github.com/apache/camel/pull/26802#issuecomment-5799676712

   Both addressed in 713392b28ddc.
   
   **Weak assertion** — correct, the test was vacuous. But the suggested patch 
does not pass; I tried it:
   
   ```
   Step should NOT carry a source location when it is off:
   foo[to2] ContextTestSupport:480 bodyType=java.lang.String ==> expected: 
<false> but was: <true>
   ```
   
   The line number is set on the route definitions when they are loaded, so 
turning `sourceLocationEnabled` off after the context has started and 
restarting the route does not remove it — which is the uncertainty the comment 
raised, resolved by measurement. The case therefore needs its own context, so 
it is now `ErrorRegistryNoSourceLocationTest`, which starts with source 
location off and asserts no location is named while the step keeps its body 
type.
   
   **Stale Javadoc** — confirmed and fixed. 
`BacklogErrorEventMessage.getMessageHistory` documented `"routeId[nodeId] 
(elapsed ms)"`, out of date since the body type and size landed in CAMEL-24844 
and now missing the source too. It documents the current format with an 
example, and says which parts are conditional and on what:
   
   > `route1[to3] orders.camel.yaml:18 (12 ms) bodyType=java.util.LinkedHashMap 
bodySize=214`
   
   28 tests in camel-core (`ErrorRegistr*`, `MessageHistory*`) 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]

Reply via email to