SPOP implemented. Hash table resizing for Sets and Expires too. Changed the resize policy to play better with RANDOMKEY and SPOP.

This commit is contained in:
antirez
2009-06-08 23:51:35 +02:00
parent d76412d1d1
commit 12fea92890
6 changed files with 61 additions and 12 deletions

View File

@@ -515,6 +515,14 @@ proc main {server port} {
lsort [$r smembers sres]
} {1 2 3 4}
test {SPOP basics} {
$r del myset
$r sadd myset 1
$r sadd myset 2
$r sadd myset 3
list [lsort [list [$r spop myset] [$r spop myset] [$r spop myset]]] [$r scard myset]
} {{1 2 3} 0}
test {SAVE - make sure there are all the types as values} {
$r lpush mysavelist hello
$r lpush mysavelist world