mirror of
https://github.com/fluencelabs/redis
synced 2025-04-05 01:01:04 +00:00
intset stress testing added, ziplist stress testing relocated in a more appropriate place
This commit is contained in:
parent
ef27ba988b
commit
4610b0332c
@ -604,6 +604,16 @@ start_server {
|
|||||||
assert_equal 3 [r llen myotherlist]
|
assert_equal 3 [r llen myotherlist]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start_server {
|
||||||
|
tags {list ziplist}
|
||||||
|
overrides {
|
||||||
|
"list-max-ziplist-value" 200000
|
||||||
|
"list-max-ziplist-entries" 256
|
||||||
|
}
|
||||||
|
} {
|
||||||
test {Explicit regression for a list bug} {
|
test {Explicit regression for a list bug} {
|
||||||
set mylist {49376042582 {BkG2o\pIC]4YYJa9cJ4GWZalG[4tin;1D2whSkCOW`mX;SFXGyS8sedcff3fQI^tgPCC@^Nu1J6o]meM@Lko]t_jRyo<xSJ1oObDYd`ppZuW6P@fS278YaOx=s6lvdFlMbP0[SbkI^Kr\HBXtuFaA^mDx:yzS4a[skiiPWhT<nNfAf=aQVfclcuwDrfe;iVuKdNvB9kbfq>tK?tH[\EvWqS]b`o2OCtjg:?nUTwdjpcUm]y:pg5q24q7LlCOwQE^}}
|
set mylist {49376042582 {BkG2o\pIC]4YYJa9cJ4GWZalG[4tin;1D2whSkCOW`mX;SFXGyS8sedcff3fQI^tgPCC@^Nu1J6o]meM@Lko]t_jRyo<xSJ1oObDYd`ppZuW6P@fS278YaOx=s6lvdFlMbP0[SbkI^Kr\HBXtuFaA^mDx:yzS4a[skiiPWhT<nNfAf=aQVfclcuwDrfe;iVuKdNvB9kbfq>tK?tH[\EvWqS]b`o2OCtjg:?nUTwdjpcUm]y:pg5q24q7LlCOwQE^}}
|
||||||
r del l
|
r del l
|
||||||
@ -666,4 +676,3 @@ start_server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -295,4 +295,40 @@ start_server {
|
|||||||
r set x 10
|
r set x 10
|
||||||
assert_error "ERR*wrong kind*" {r smove myset2 x foo}
|
assert_error "ERR*wrong kind*" {r smove myset2 x foo}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tags {slow} {
|
||||||
|
test {intsets implementation stress testing} {
|
||||||
|
for {set j 0} {$j < 20} {incr j} {
|
||||||
|
unset -nocomplain s
|
||||||
|
array set s {}
|
||||||
|
r del s
|
||||||
|
set len [randomInt 1024]
|
||||||
|
for {set i 0} {$i < $len} {incr i} {
|
||||||
|
randpath {
|
||||||
|
set data [randomInt 65536]
|
||||||
|
} {
|
||||||
|
set data [randomInt 4294967296]
|
||||||
|
} {
|
||||||
|
set data [randomInt 18446744073709551616]
|
||||||
|
}
|
||||||
|
set s($data) {}
|
||||||
|
r sadd s $data
|
||||||
|
}
|
||||||
|
assert_equal [lsort [r smembers s]] [lsort [array names s]]
|
||||||
|
set len [array size s]
|
||||||
|
for {set i 0} {$i < $len} {incr i} {
|
||||||
|
set e [r spop s]
|
||||||
|
if {![info exists s($e)]} {
|
||||||
|
puts "Can't find '$e' on local array"
|
||||||
|
puts "Local array: [lsort [r smembers s]]"
|
||||||
|
puts "Remote array: [lsort [array names s]]"
|
||||||
|
error "exception"
|
||||||
|
}
|
||||||
|
array unset s $e
|
||||||
|
}
|
||||||
|
assert_equal [r scard s] 0
|
||||||
|
assert_equal [array size s] 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user