tests: assert which session events the host forwards, not how many - #6693
Merged
Conversation
Two tests pinned the count at 10, so forwarding agent_false_interruption in #6691 broke them. Bumping the number would keep the weaker assertion: a count cannot say which events are forwarded, and it cannot catch the failure that matters, an `on` registered without its matching `off`. Dropping one `off` leaves the count at 10 and passes today. Both tests now compare against one FORWARDED_EVENTS set, which pairs register with aclose: an event added to one and not the other fails, and the failure names it.
davidzhao
approved these changes
Aug 4, 2026
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.
test_register_sessionandtest_aclose_unregisters_eventspinned the forwarded-event count at 10, so #6691 broke them by forwarding an eleventh.Bumping the number keeps the weaker assertion. A count cannot say which events are forwarded, and it cannot catch the failure that matters: an
onregistered without its matchingoffleaks a handler across reconnects, and removing oneofftoday leaves the count at 10 and passes.Both tests now compare against a single
FORWARDED_EVENTSset, which pairs registration with teardown. Verified by deleting oneoff: the count assertion passes, the set assertion fails and names the event.Suite on this branch: 1308 passed, 0 failed. Clean main for comparison: 1306 passed, 2 failed. The 9 collection errors either way are a local OTLP exporter issue, unrelated.