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

   Sixth batch of 
[CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (test coverage 
of the CLI commands): `camel cmd route-diagram` (25% line coverage before) and 
`camel cmd span` (33%).
   
   ### Tests
   - `CamelRouteDiagramActionRunningTest` (new): the diagram of a running 
integration as text (the images need a terminal with graphics): ASCII and 
Unicode, `--filter`, `--highlight`, into a text file, and the errors. It runs 
the step after the terminal set-up with `callWithResponse(Callable, 
JsonObject)` (#27963).
   - `CamelSpanActionViewsTest` (new): the traces (with their routes, remote 
components and status), `--filter`, `--sort`, the flat list of spans, the 
waterfall of a trace, JSON of a trace, no spans yet, and an integration without 
the in-memory exporter.
   
   ### Bugs the tests found
   - **`camel cmd route-diagram --highlight`** never filtered the routes: 
`RouteDiagramHelper.filterAndOrderRoutes` keeps all of them without the order a 
message visited them in, which the command does not have. So its "No routes 
contain highlighted nodes" was never reached, and node ids that no route has 
drew the diagram with nothing highlighted (exit `0`). The routes are still all 
drawn (the call that did nothing is gone), and ids that no route has are not 
found (`3`). Its errors went to stdout with exit `1`; they go to stderr, and a 
graphical `--theme` without terminal graphics exits with `2`.
   - **`camel cmd span --trace`** with an id that matches no trace printed `No 
trace found matching '...'` on stdout and exited with `0`; now not found (`3`). 
An unknown `--sort` key of the traces sorted the newest first; it is a usage 
error now that lists the keys (the flat list already had one).
   
   The user-visible changes are in the 4.24 upgrade guide.
   
   `mvn test` of camel-jbang-core: all tests pass.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My
   


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