diff options
Diffstat (limited to 'spec/test_init.lua')
| -rw-r--r-- | spec/test_init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/test_init.lua b/spec/test_init.lua index 800dcaa..338b7a7 100644 --- a/spec/test_init.lua +++ b/spec/test_init.lua @@ -115,7 +115,11 @@ return { handle.emit("turn_interrupt", { phase = "interrupt" }) assert(job._cancel_requested, "an interrupted turn asks its children to stop") handle.emit("turn_end", { phase = "end", reason = "interrupted" }) - assert(job._closed, "the end of the turn joins every child") + assert(not job._closed, "the end of the turn never joins a pump from the owner thread") + -- The pump exits (the fake settles cancelled on its next poll) + -- and the drain that notices it does the close. + jobs.await({ started }, "all") + assert(job._closed, "a child closes as soon as its pump exits") end) jobs.close_all() assert(checked, failure) |
