Skip to content

Stabilize Resp3DowngradeTests: keep publishing until the restored subscription receives - #3396

Merged
mgravell merged 1 commit into
mainfrom
marc/stabilize-resp3-downgrade-test
Dec 3, 2026
Merged

mgravell merged 1 commit into
mainfrom
marc/stabilize-resp3-downgrade-test

Conversation

@mgravell

@mgravell mgravell commented Dec 2, 2026

Copy link
Copy Markdown
Member

Stabilizes Resp3DowngradeTests.SubscribeQueuedBeforeDowngradeDoesNotPoisonInteractive, which failed on Windows/net481 in the CI for #3389 with Not found: "payload".

Cause

After the simulated failure, the test waits for the interactive connection to come back as RESP2, runs a SET/GET, then publishes once and waits 10s for the message. The subscription is restored separately: on its own connection with a dedicated one, and via the restore sweep either way. A message published before that SUBSCRIBE lands isn't delivered, so on a slow runner the test waits for a message that was never coming.

Change

Publish every 250ms until a message arrives, still within the same 10s. A subscription that is never restored still fails the test. The invariant checks that follow are unchanged.

Verification

The failure didn't reproduce locally as the test stands: 0 of 15 sequential runs and 0 of 24 with eight copies in parallel, on net481. So I forced the timing instead, by having the test server hold each post-downgrade SUBSCRIBE for 1.5s (a temporary change, not part of this PR):

both cases
test as on main, with the delay fail: Not found: "payload", as in CI
this PR, with the delay pass

Without the delay, it passes on net481 and net10.0.

…receives

The test published once, straight after the interactive connection came back as RESP2. The subscription is
restored separately (with a dedicated connection, on a connection of its own), and a message published before
that SUBSCRIBE lands is not delivered, so on a slow runner the test waited 10s for a message that was never coming.
It now publishes every 250ms until one arrives, still within 10s, so a subscription that is never restored still
fails it.
@mgravell
mgravell merged commit e56835e into main Dec 3, 2026
3 checks passed
@mgravell
mgravell deleted the marc/stabilize-resp3-downgrade-test branch December 3, 2026 09:30
mgravell added a commit that referenced this pull request Dec 3, 2026
* Docs: why WithRetry has no retrying batch, and what to use instead (#3388)

A batch's one guarantee is an uninterrupted run, which a retry would break:
a batch cannot be replayed as a unit (some of it may have applied), and
re-issuing just the failed element would reorder it. Document that, and the
alternatives: pipelined commands on the retrying database for independent
work (each retried by its own category), a retrying transaction for
all-or-nothing, and a plain batch where the uninterrupted run is what matters.

Closes #3370.

(cherry picked from commit 5e2e8e4)

* Stabilize two racy tests: keyspace notification counting, and the drain-cap MOVING test (#3393)

PubSubKeyNotificationTests counted an event in the total before counting its key. Multi-node
notifications arrive on several reader threads, so the last event could complete the run while
another, already in the total, had not yet counted its key: the per-key check came up one short
(expected 51, actual 50). Count the key first.

MovingWaitsForSlowCommandsThatFitInsideTheDrainCap needs exactly one 3s command in flight, but
SetLatency slowed every command, and the in-process server answers one at a time: a background
INFO ahead of the PING pushed the PING's reply to ~6s, past the 5s drain cap, so the recycle
failed it. Add a SetLatency overload that holds a single command, and slow only the PING.

(cherry picked from commit f5bf0c3)

* Resp3DowngradeTests: keep publishing until the restored subscription receives (#3396)

The test published once, straight after the interactive connection came back as RESP2. The subscription is
restored separately (with a dedicated connection, on a connection of its own), and a message published before
that SUBSCRIBE lands is not delivered, so on a slow runner the test waited 10s for a message that was never coming.
It now publishes every 250ms until one arrives, still within 10s, so a subscription that is never restored still
fails it.

(cherry picked from commit e56835e)

* Port main's small 3.5.0 fixes and test hardening to v4

- #3374 (+#3376): v4 already had the inverted-check fix; its regression test comes over
  (as #3374 shipped it - #3376's TryAdoptEndpoint rename belongs with #3353)
- #3361: v4 already disposes socketless tunnel streams; its regression test comes over
- #3386: the toy server's CLUSTER SLOTS snapshot fix; the other two windows are in
  code v4 replaced (QuitAllServers, PhysicalBridge creation; v4 executors connect lazily)
- #3395: already the v4 behaviour (GetConnectionId does not dial)
- #3394: not applicable; the test it fixes went with the old core
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.

1 participant