mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
new test added
This commit is contained in:
parent
4ad37480f3
commit
7276646263
@ -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 "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} {
|
||||
set err {}
|
||||
for {set x 0} {$x < 10000} {incr x} {
|
||||
|
Loading…
Reference in New Issue
Block a user