Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe what this pull request is trying to achieve.
This is a part of #10291 (test overhaul).
The point is to be able to gracefully shut down the server (e.g. to be able to save code coverage information, for testing).
Additional notes and description of your changes
need_restart
mechanism is changed toserver_command
(with"stop"
and"restart"
being valid values)state.request_restart()
API for setting this, which deduplicates a couple copy-pasted segmentswebui()
poll forneed_restart
every 0.5 seconds, there's a newwait_for_server_command()
API_stop
route that will causeserver_command
to be set to"stop"
. This is so that the CI process can start the server in the background and then ask it to quit when tests are finished.SIGUSR1
too, if the option and HTTP route is too much.Environment this was tested in