Skip to content

fix(test): fully resolve spub/ssub auto-resubscription race condition#2093

Open
rit3sh-x wants to merge 2 commits intoredis:mainfrom
rit3sh-x:fix/spub-ssub-race-condition-followup
Open

fix(test): fully resolve spub/ssub auto-resubscription race condition#2093
rit3sh-x wants to merge 2 commits intoredis:mainfrom
rit3sh-x:fix/spub-ssub-race-condition-followup

Conversation

@rit3sh-x
Copy link
Copy Markdown
Contributor

@rit3sh-x rit3sh-x commented Apr 4, 2026

Summary

Test plan

  • All 555 tests passing, 0 failures
  • Stable under nyc coverage overhead

Note

Low Risk
Low risk: test-only changes that make the auto-resubscribe assertions deterministic by removing timing races around ssubscribe and reconnect.

Overview
Makes the spub/ssub auto-resubscription functional test deterministic by awaiting initial ssubscribe calls before disconnecting and by polling the ssubscribe stub until all expected resubscribe calls have occurred (instead of assuming ping() is a sufficient barrier).

Reviewed by Cursor Bugbot for commit 58ee73b. Bugbot is set up for automated code reviews on this repo. Configure here.

  Follow-up to redis#2092. Await initial ssubscribe calls and poll for
  stub.callCount before asserting, so the test is stable under load.
@PavelPashov
Copy link
Copy Markdown
Contributor

@rit3sh-x thanks, I'll take a look

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