Skip to content

test: cover .cat --follow and .last --follow disconnect cleanup - #57

Merged
cablehead merged 1 commit into
mainfrom
test/follow-disconnect-cleanup
Oct 23, 2026
Merged

cablehead merged 1 commit into
mainfrom
test/follow-disconnect-cleanup

Conversation

@cablehead

Copy link
Copy Markdown
Owner

Adds disconnect-cleanup coverage for .cat --follow and .last --follow, the gap called out in #55.

cross-stream 0.14.1 (dff9662) fixed the follow loops to observe the caller's interrupt, so a disconnected SSE client no longer parks a thread until the next matching frame. http-nu already depends on 0.14.1 (since v0.18.0), but nothing tested the follow case.

Changes

  • Extract the body of test_bus_sub_released_when_client_disconnects into a shared helper assert_streams_released_on_disconnect.
  • Add test_cat_follow_released_when_client_disconnects and test_last_follow_released_when_client_disconnects, each running a store-backed server whose handler follows a topic nothing writes to.

Verification

  • Both new tests pass on cross-stream 0.14.1 and fail on 0.14.0 (threads 17 -> 27, one parked per disconnected client), confirming they catch the regression.
  • Live re-test (20 SSE clients, no appends): thread count returns to baseline within 0.2s for both .cat --follow and .last --follow.
  • Full scripts/check.sh passes.

Closes #55.

@cablehead
cablehead merged commit 5588105 into main Oct 23, 2026
8 checks passed
@cablehead
cablehead deleted the test/follow-disconnect-cleanup branch October 23, 2026 18:33
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.

Re-test disconnect cleanup for .cat --follow once xs#164 is fixed

1 participant