test(scenario): drive in-flight traffic during MOVING relaxed-timeout test - #3853
Open
kiryazovi-redis wants to merge 1 commit into
Open
test(scenario): drive in-flight traffic during MOVING relaxed-timeout test#3853kiryazovi-redis wants to merge 1 commit into
kiryazovi-redis wants to merge 1 commit into
Conversation
… check timeoutUnrelaxedOnMovingTest issued a single reactive BLPOP after the MOVING push against an otherwise idle connection. On a re-bind with an empty command stack the client reconnects immediately without relaxing timeouts (relaxation protects in-flight commands; see MaintenanceAwareConnectionWatchdog#rebind), so the measured command saw the normal 30ms timeout and the "at least one relaxed timeout during MOVING" assertion failed. Keep continuous traffic in flight across the maintenance operation so the re-bind is exercised as a real workload would. With traffic in flight the client relaxes during MOVING as designed (verified locally: MOVING command times out at the relaxed 130ms). No client change required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RelaxedTimeoutConfigurationTest.timeoutUnrelaxedOnMovingTestintermittentlyfailed with "expected at least one relaxed timeout … but was 0". The test issued
only a single reactive command around the MOVING/re-bind. When the command stack
is empty on a MOVING re-bind, the client reconnects immediately without
relaxing the timeout (by design — see
MaintenanceAwareConnectionWatchdog#rebind),so the single command observes the normal timeout and the assertion never sees a
relaxed one.
Real workloads have commands in flight across the re-bind, which is exactly when
timeout relaxation is meant to kick in.
What changed
operation so the re-bind happens with a non-empty command stack and the
relaxation path is exercised as designed. Traffic is stopped and joined in a
finallyblock.Test-only change.
Test plan
RelaxedTimeoutConfigurationTest#timeoutUnrelaxedOnMovingTestagainst aserver that emits MOVING notifications during a re-bind.
Prepared with AI assistance and reviewed under my account.
Note
Low Risk
Test-only change to scenario coverage; no production code paths modified.
Overview
Fixes flaky
timeoutUnrelaxedOnMovingTestfailures where no relaxed timeout was observed (expected at least one relaxed timeout … but was 0).The test now runs a daemon background thread that continuously issues async
SETcommands (with a short sleep) for the whole maintenance window, then stops and joins it infinally. That mirrors real workloads: when the command stack is empty on a MOVING re-bind,MaintenanceAwareConnectionWatchdog#rebindreconnects without relaxing timeouts, so a single reactive command could miss the relaxation path the test is meant to validate.Production client behavior is unchanged — test-only.
Reviewed by Cursor Bugbot for commit c227593. Bugbot is set up for automated code reviews on this repo. Configure here.