X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/25fd2cb284ac12447059aa0e8ec87db9fb75f79d..3c68de9b0107a0a15eef09edf86464d1434048e7:/test-redis.tcl diff --git a/test-redis.tcl b/test-redis.tcl index dacd6e5f..c0a025af 100644 --- a/test-redis.tcl +++ b/test-redis.tcl @@ -280,6 +280,27 @@ proc main {server port} { $r get foo } [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 "pl-$j" $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 '$payload($index)' but I read back '$buf'" + break + } + } + unset payload + set _ $err + } {} + test {SET 10000 numeric keys and access all them in reverse order} { set err {} for {set x 0} {$x < 10000} {incr x} { @@ -294,11 +315,11 @@ proc main {server port} { } } set _ $err - } {49995000} + } {} - test {DBSIZE should be 10001 now} { + test {DBSIZE should be 10101 now} { $r dbsize - } {10001} + } {10101} test {INCR against non existing key} { set res {}