davsclaus opened a new pull request, #27927: URL: https://github.com/apache/camel/pull/27927
Step 7 of [CAMEL-25388](https://issues.apache.org/jira/browse/CAMEL-25388): `camel stop` and `camel restart` wait for the integration and report what happened, instead of returning at once. ### camel stop - Waits until the integration has stopped, up to `--timeout` (60 seconds by default, millis or a duration such as `2m`), and exits `124` with `use --kill` when it did not stop in time. `--no-wait` returns at once, as before. - An integration without a pid file in `~/.camel` (such as one not started by the CLI) is stopped with `SIGTERM`, which did nothing before. - A name or pid that matches no running integration exits `3`. ### camel restart - Finds exactly one integration (`ProcessFinder.requireOne`), stops it like `camel stop` (terminating it when it does not stop within `--timeout`), and does not start it again while the old process is alive (`124`). - Waits until the new integration has started (phase 5). A new integration that stops right away prints the end of its log and exits `1`; one that is still starting after `--timeout` exits `124` and is left running. - Keeps the output of the new integration in a log file in `~/.camel` and prints its path (the log was removed when the command ended). ### Docs - 4.24 upgrade guide: "camel stop and camel restart wait for the integration". - `camel-jbang-managing.adoc`: stop and restart. ### Tests - `StopProcessTest`: waits until the process has exited, timeout (124 with the hint), `--no-wait`, `SIGTERM` without a pid file, `--kill`. - `RestartProcessTest`: no match and several matches exit 3, a missing command line is a failure, the tail of the log. - Real processes with a fake integration: `camel stop` waits for the exit, and `camel restart` starts it again and waits until it has started. - `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]
