Tests: wait for a dropped session's forwards to stop, not just for the tab to go dead #23

Merged
jaap-jan merged 1 commits from claude/elastic-mccarthy-6b4ae7 into main 2026-10-16 12:04:42 +00:00
Owner

WhenTheSessionEnds_ItsForwardsSayTheyWentWithIt failed once under a full run. Ended clears IsLive
and then tells each forward its session is over, in one call. The app's dispatcher never splits that,
but the harness's post runs it on the fake shell's thread, so the test's poll on !IsLive could return
between the two and find the forwards still listening.

The test now also waits until every forward says "Stopped with the session.", the last thing
SessionEnded sets. A 300 ms sleep injected between the two steps fails the old test and passes the new
one; the full App.Tests suite passed three runs in a row.

WhenTheSessionEnds_ItsForwardsSayTheyWentWithIt failed once under a full run. Ended clears IsLive and then tells each forward its session is over, in one call. The app's dispatcher never splits that, but the harness's post runs it on the fake shell's thread, so the test's poll on !IsLive could return between the two and find the forwards still listening. The test now also waits until every forward says "Stopped with the session.", the last thing SessionEnded sets. A 300 ms sleep injected between the two steps fails the old test and passes the new one; the full App.Tests suite passed three runs in a row.
jaap-jan added 1 commit 2026-10-16 12:03:19 +00:00
Tests: wait for a dropped session's forwards to stop, not just for the tab to go dead
ci / build and test (pull_request) Successful in 2m42s
ci / desktop nightly (pull_request) Skipped
ci / api image (pull_request) Successful in 7s
ci / deploy ssh.dodotech.cloud (pull_request) Skipped
ci / android head (pull_request) Successful in 3m42s
f43436218a
WhenTheSessionEnds_ItsForwardsSayTheyWentWithIt failed once under a full run. Ended clears IsLive
and then tells each forward its session is over, in one call. The app's dispatcher never splits that,
but the harness's post runs it on the fake shell's thread, so the test's poll on !IsLive could return
between the two and find the forwards still listening.

The test now also waits until every forward says "Stopped with the session.", the last thing
SessionEnded sets. A 300 ms sleep injected between the two steps fails the old test and passes the new
one; the full App.Tests suite passed three runs in a row.
jaap-jan merged commit 089de72834 into main 2026-10-16 12:04:42 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DodoTech-Public/DodoSSH#23