Skip to content

Commit

Permalink
Fix scan test failing over COUNT being a recommendation and not strict
Browse files Browse the repository at this point in the history
  • Loading branch information
BarakSilverfort committed Sep 28, 2023
1 parent 4938be5 commit ea89c4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration/generic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ func TestScan(t *testing.T) {
c.Do("SCAN", "0", "TYPE", "set", "MATCH", "setkey")
c.Do("SCAN", "0", "TYPE", "set", "COUNT", "100")
c.Do("SCAN", "0", "TYPE", "set", "MATCH", "setkey", "COUNT", "100")
c.DoLoosely("SCAN", "0", "COUNT", "1") // cursor differs
c.DoLoosely("SCAN", "0", "COUNT", "2") // cursor differs

// SCAN may return a higher count of items than requested (See https://redis.io/docs/manual/keyspace/), so we must query all items.
c.DoLoosely("SCAN", "0", "COUNT", "100") // cursor differs

// Can't really test multiple keys.
// c.Do("SET", "key2", "value2")
Expand Down

0 comments on commit ea89c4f

Please sign in to comment.