test(events): only count the signals caused by the test - #385
Merged
Conversation
`#notify_change ignores the stale room-mailbox echo but never the master
copy` asserts exact signal counts, but its stub recorded every POST to
staff/event/changed, including ones it did not cause.
Signals are emitted from spawned fibres, so an earlier example's signal can
still be in flight when this example installs its stub, and is then counted
as ours. A full suite run leaks three such signals: they are visible in the
log as `Unhandled exception in spawn: Real HTTP connections are disabled`
whenever they land somewhere without a matching stub. Landing here instead
takes the count from 1 to 2:
Failure/Error: captured_bodies.size.should eq 1
Expected: 1
got: 2
The example passes in isolation and on the seed CI reported, because
whether a stray lands inside its window is a matter of timing. It surfaced
now because PPT-2640 added a further sixteen examples that emit signals
from this controller.
Record only signals carrying this example's own dedicated system id, and
stand in a foreign signal deliberately so the isolation is asserted rather
than left to timing.
chillfox
marked this pull request as ready for review
August 2, 2026 08:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.