davsclaus opened a new pull request, #27975: URL: https://github.com/apache/camel/pull/27975
Tenth batch of [CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (test coverage of the CLI commands): `camel get bean` (58% line coverage before), `camel get route-controller` (52%) and `camel top source` (52%), which each had a test of the request and one of a name that matches nothing. ### Tests The answers of the fake integration are what the dev consoles answer (bean, bean-model, route-controller and top), and each command is parsed by picocli with its real defaults. - `CamelBeanDumpTest`: the options sent to the integration, the properties table, a `null` value, `--properties=false`, `--sort=type`, `--scope=user` and `camel`, `--dsl` with the configuration of each property, JSON, an answer without beans. - `RouteControllerActionTest`: the default and the supervising route controller (header, the state of each route: starting, restarting, exhausted), the stack traces, `--depth`, `--trace=false`, `--header=false`, `--sort=state`, JSON, an answer without routes. - `CamelSourceTopTest`: the slowest processors first with their code (the matched line marked, the code unescaped), `--filter-mean`, `--limit`, a processor without exchanges yet, JSON, an answer without processors. ### Bugs the tests found - **`camel get bean --dsl`** paired the configuration of the properties (`modelProperties`) with the properties by position. With `--nulls=false` the bean-model console leaves out different properties from the two lists, so it showed the configuration of another property, or failed with an `IndexOutOfBoundsException` (exit `70`). Now by name. An unknown **`--scope`** showed every bean; now a usage error (`2`). - **`camel get route-controller`** read the back-off times and attempts, which the console reports as longs, as ints (a value over 24 days showed as another number), and showed `Starting Routes: false` for the default route controller, which does not report it. - **`camel top source --json`** had `total`, `mean`, `min`, `max` and `last` as text, while the JSON of the other listings has numbers. The user-visible changes are in the 4.24 upgrade guide. `mvn test` of the action command tests of camel-jbang-core: all pass. Each fix was checked by running the new tests without it: the 5 tests of the bugs fail. _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]
