This makes it vastly easier to handle task singnalling; signals can be sent to all
processes in the group, including SIGTERM.
The Apple and Linux variants have largely been combined into a single codebase.
This avoids a class of race errors where the message handler reports a failure but because the task handler sees a later iteration of the state, the request actually succeeds.
Make the function fetch a new status every loop iteration and actually
test the group status attribute against the expected status.
This fixes the flaking observed in `daemon_tests` ->
`daemon::edit::test_edit_flow`, where the final task state after editing
is 'Running' because the edit takes place before the 'Pause' operation
has completed.
With test-log, using the test_log::test macro to replace a `#[test]`
attribute (or to wrap a `#[tokio::test(...)]` attribute) injects logging
setup boilerplate to that test. Use `RUST_LOG=<level>` to then control
logging output for such tests, visible when the test fails or when using
`cargo test -- --nocapture` / `cargo nextest run --no-capture`. The
default log level is 'error'.
These will help surface flaky tests, and help PR authors see what tests
are failing, if any. The workflow uses the really excellent [Publish
Test Results][ptr] GitHub action to do all the heavy lifting.
[ptr]: https://github.com/marketplace/actions/publish-test-results
Cargo nextest is faster, and handles flaky tests (tests that can fail even
though nothing changed). Both the regular test run and the coverage run include
it.
This makes Message use simpler, getting rid of a lot of boilerplate. The task manager channel is now a wrapper type accepting Into<Message>, keeping implementation details closer to the rest of the task manager code base.
Use tokio::time::sleep rather than std:🧵:sleep; the async version cooperates (yields to other tasks), so _just the task_ is blocked, not all tasks being run in the same thread.