Repository navigation
Fix failing sort command test caused by data interference through shared key - #3724
Merged
Merged
Conversation
4 tasks done
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.
Sort commands test (
SortCommandIntegrationTests.sortGetin particular) consistently fails on the pipeline, while there is no issue with local runs and debug sessions.Turns out it always fails due to missing first item in the relevant list, issued in the test, which suggests the test data is affected by some other test/component in the env.
To avoid this, replacing the exsiting common key(from base class) with a distinct one looks like the quick fix.
For the long term, all async operations that changes data as part of test requirements should be tracked and either awaited to ensure completion before assertions, or rolled back after the test to leave the shared state clean for subsequent tests.
Note
Low Risk
Test-only change that only affects key naming; no production code or behavior is modified.
Overview
Fixes flaky
SortCommandIntegrationTestsby switching the test data key from the sharedTestSupport.keyconstant to a dedicated per-test class key ("sort-command-key"), reducing the chance of interference from other tests running in the same Redis instance.Reviewed by Cursor Bugbot for commit 6871fc5. Bugbot is set up for automated code reviews on this repo. Configure here.