Skip to content

tests: assert which session events the host forwards, not how many - #6693

Merged
theomonnom merged 1 commit into
mainfrom
theo/session-host-event-set-tests
Aug 4, 2026
Merged

tests: assert which session events the host forwards, not how many#6693
theomonnom merged 1 commit into
mainfrom
theo/session-host-event-set-tests

Conversation

@theomonnom

Copy link
Copy Markdown
Member

test_register_session and test_aclose_unregisters_events pinned 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 on registered without its matching off leaks a handler across reconnects, and removing one off today leaves the count at 10 and passes.

Both tests now compare against a single FORWARDED_EVENTS set, which pairs registration with teardown. Verified by deleting one off: 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.

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.
@theomonnom
theomonnom requested a review from a team as a code owner August 4, 2026 04:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@theomonnom
theomonnom merged commit b47f909 into main Aug 4, 2026
25 of 26 checks passed
@theomonnom
theomonnom deleted the theo/session-host-event-set-tests branch August 4, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants