new test added

This commit is contained in:
antirez 2010-01-15 09:37:26 -05:00
parent 4ad37480f3
commit 7276646263

View File

@ -280,6 +280,27 @@ proc main {server port} {
$r get foo $r get foo
} [string repeat "abcd" 1000000] } [string repeat "abcd" 1000000]
test {Very big payload random access} {
set err {}
array set payload {}
for {set j 0} {$j < 100} {incr j} {
set size [expr 1+[randomInt 100000]]
set buf [string repeat "abcd" $size]
set payload($j) $buf
$r set bigpayload_$j $buf
}
for {set j 0} {$j < 1000} {incr j} {
set index [randomInt 100]
set buf [$r get bigpayload_$index]
if {$buf != $payload($index)} {
set err "Values differ: I set '$buf' but I read back '$buf2'"
break
}
}
unset payload
set _ $err
} {}
test {SET 10000 numeric keys and access all them in reverse order} { test {SET 10000 numeric keys and access all them in reverse order} {
set err {} set err {}
for {set x 0} {$x < 10000} {incr x} { for {set x 0} {$x < 10000} {incr x} {