davsclaus opened a new pull request, #27966: URL: https://github.com/apache/camel/pull/27966
Fourth batch of [CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (test coverage of the CLI commands): `camel get history` (28% line coverage before) and `camel restart` (22%). ### Tests - `CamelHistoryActionTest` (now AssertJ, 13 tests): the steps of an exchange (from, a log, a nested step, two split messages, an endpoint with a secret, the end), `--depth`, `--depth=0`, `--limit-split`, `--source`, `--mask` (table and JSON), the stack trace of a failed exchange, `--show-exception=false`, and `--diagram` with two integrations. - `RestartProcessTest`: the successful restart its TODO asked for (the integration is a shell script that writes the status of a started Camel for its pid, and `exec`s a sleep so stopping its pid stops it; not on Windows), a relaunch that stops right away (exit `1` with the end of its log), and how the command line of an integration is read back. ### Bugs the tests found - **`camel get history`**: a failed step with `--show-exception=false` (or without an exception) failed with a `NullPointerException` (exit `70`); it shows `Failed`. `--diagram` and `--it` with several integrations printed a message on stdout and exited with `1`; they are usage errors now (`2`) that ask for the name or pid of one. The errors of `--diagram` go to stderr, and a graphical `--theme` without terminal graphics exits with `2` (as `camel get error` in #27964). `--json` ignored `--mask`; it masks `endpointUri` and `nodeLabel` too. An empty `finally` block is gone. - **`camel restart`** reads the command line back from one text when the process has no arguments (as on Windows), where a backslash escaped the next character: `"C:\Program Files\Java\bin\java.exe"` became `C:Program FilesJavabinjava.exe`, and the restart failed. Only an escaped quote is unescaped now. 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]
