X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/04a10b1a6d372bd7a1105150194881eccbfd5620..890a2ed989274cb09b5cde1def3935e110ec3cb9:/tests/unit/type/zset.tcl diff --git a/tests/unit/type/zset.tcl b/tests/unit/type/zset.tcl index 6e32a4b8..761cac49 100644 --- a/tests/unit/type/zset.tcl +++ b/tests/unit/type/zset.tcl @@ -10,7 +10,7 @@ start_server {tags {"zset"}} { if {$encoding == "ziplist"} { r config set zset-max-ziplist-entries 128 r config set zset-max-ziplist-value 64 - } elseif {$encoding == "raw"} { + } elseif {$encoding == "skiplist"} { r config set zset-max-ziplist-entries 0 r config set zset-max-ziplist-value 0 } else { @@ -353,6 +353,14 @@ start_server {tags {"zset"}} { assert_equal 0 [r exists dst_key] } + test "ZUNIONSTORE with empty set - $encoding" { + r del zseta zsetb + r zadd zseta 1 a + r zadd zseta 2 b + r zunionstore zsetc 2 zseta zsetb + r zrange zsetc 0 -1 withscores + } {a 1 b 2} + test "ZUNIONSTORE basics - $encoding" { r del zseta zsetb zsetc r zadd zseta 1 a @@ -458,7 +466,14 @@ start_server {tags {"zset"}} { } basics ziplist - basics raw + basics skiplist + + test {ZINTERSTORE regression with two sets, intset+hashtable} { + r del seta setb setc + r sadd set1 a + r sadd set2 10 + r zinterstore set3 2 set1 set2 + } {0} proc stressers {encoding} { if {$encoding == "ziplist"} { @@ -466,7 +481,7 @@ start_server {tags {"zset"}} { r config set zset-max-ziplist-entries 256 r config set zset-max-ziplist-value 64 set elements 128 - } elseif {$encoding == "raw"} { + } elseif {$encoding == "skiplist"} { r config set zset-max-ziplist-entries 0 r config set zset-max-ziplist-value 0 set elements 1000 @@ -684,6 +699,6 @@ start_server {tags {"zset"}} { tags {"slow"} { stressers ziplist - stressers raw + stressers skiplist } }