Closed arvid220u closed 7 months ago
@alfonsojimenez implemented this long ago (thank you!)
Would love to see a pull request resolving the functional discrepancy—but otherwise agree a documentation change would help clarify.
Open to pull requests addressing this.
The following minimal example showcases a discrepancy between MockRedis and the real Redis.
First, let's add two keys:
Second, let's scan:
This is the expected return value. Now, let's say we want to remove
key1
and continue our scan:This is where the bug is, because we expect to receive back
["0", ["key2"]]
, which is what the real Redis gives us.I looked into the implementation of
scan
inMockRedis
and it looks like it behaves quite differently fromscan
in the real Redis, so I'm not sure how to fix it.I know that
scan
is not listed under the supported features ofMockRedis
, so I totally understand if this is a non-fix. In that case, maybescan
should be listed under "Mostly-Supported Commands" of the Readme?