mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
The tokio task that removes the trigger after the last after-action was not woken up & cancelled by the cancellation token, but left to die when tokio quits. Unfortunately this broke the tests, where tokio is kept from one reaction launch to another. Those tasks kept a reference to the DB, then preventing it to close, then preventing a new DB instance from being opened. This was difficult to debug due to the tests only checking that reaction quits with an error, but not testing what kind of error it is. So they now check that reaction quits with the "normal" error, which is that all streams finished. The tokio task is now woken up, like the other sleeping tasks, at shutdown, and quits doing nothing. It's not very satisfying because I assume it's a bit costly to wake up a task, so I'm gonna see how I can improve this. I may start a new tokio runtime for each subtest. I may delete this task and move its instructions to the last after-action. I may do both. |
||
|---|---|---|
| .. | ||
| simple.rs | ||
| test-after.jsonnet | ||
| test-shutdown.jsonnet | ||