You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case I want to get long list of keys then Get All Match Keys will fail my test.
# Set To Redis some other keys so that DB would have data before cycle below
FOR ${counter} IN RANGE 100
Set To Redis ${REDIS CONN} MyKey_${counter} ${counter}
END
@{key_list}= Get All Match Keys ${REDIS CONN} MyKey_* count=100
${count} Get length ${key_list}
Should Be Equal As Integers ${count} 100
==============================================================================
TEST | FAIL |
84 != 100
------------------------------------------------------------------------------
Tests.MyTests | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
And this is totally expected. Scan do not guarantee that it will get all keys in one go. That is count=100 means that Redis will atomically parse 100 keys and return current position for next scan operation:
In case I want to get long list of keys then
Get All Match Keys
will fail my test.And this is totally expected. Scan do not guarantee that it will get all keys in one go. That is
count=100
means that Redis will atomically parse 100 keys and return current position for next scan operation:Scan operation should be continued until first value of return becomes
0
again (1) "88"
should become0
)See https://redis.io/docs/latest/commands/scan/
The text was updated successfully, but these errors were encountered: