Repository navigation
test(client): create the key before BLESS SET/GET/CLEAR - #3490
Merged
Merged
Conversation
The server rejects BLESS SET, GET and CLEAR on a missing key with "ERR no such key". The specs called them on a key that did not exist, so they failed on every server that has BLESS (8.12+, unstable). PR CI tops out at 8.10, so the version gate skipped them there. Create the key first and assert the real replies instead of only the reply type.
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.
This pull request fixes the BLESS SET, GET and CLEAR behavior tests, which fail every night against Redis
unstable.The server rejects these commands on a key that does not exist and replies
ERR no such key. The specs called them on a key they never created, so all six tests (client and cluster) failed on every server that has BLESS. PR CI did not catch this. The specs only run on 8.12 or newer, and the newest server in the PR CI matrix is 8.10.The specs now create the key first. They also check the real replies, not just the reply type:
BLESS SETreturns 1, then 0 on a repeat.BLESS GETreturns[], then['NO-EVICT']after a set.BLESS CLEARreturns 1, then 0 on a repeat.This is a test-only change. No runtime code changes.
Separate follow-up: add an 8.12 or
unstableentry to the PR CI matrix so 8.12-only tests run before merge.Note
Low Risk
Test-only updates to integration specs; no production or client runtime behavior changes.
Overview
Fixes failing BLESS SET/GET/CLEAR client behavior specs on Redis 8.12+ by matching server rules: BLESS only works on keys that already exist.
Each spec now
SETs the key before exercising BLESS. Assertions move from loose type checks to expected integer/array replies—e.g. SET/CLEAR return1then0on repeat, GET returns[]then['NO-EVICT']after a bless.Test-only; no client or command implementation changes.
Reviewed by Cursor Bugbot for commit ea71869. Bugbot is set up for automated code reviews on this repo. Configure here.