mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
the test runs less iterations of slow tests if no --accurate is given.
This commit is contained in:
parent
524d515f0c
commit
30cf7be60c
@ -6,8 +6,10 @@ start_server {tags {"repl"}} {
|
||||
s -1 role
|
||||
} {slave}
|
||||
|
||||
if {$::accurate} {set numops 50000} else {set numops 5000}
|
||||
|
||||
test {MASTER and SLAVE consistency with expire} {
|
||||
createComplexDataset r 50000 useexpire
|
||||
createComplexDataset r $numops useexpire
|
||||
after 4000 ;# Make sure everything expired before taking the digest
|
||||
r keys * ;# Force DEL syntesizing to slave
|
||||
after 1000 ;# Wait another second. Now everything should be fine.
|
||||
|
@ -13,10 +13,11 @@ start_server {tags {"other"}} {
|
||||
} {OK}
|
||||
|
||||
tags {slow} {
|
||||
if {$::accurate} {set iterations 10000} else {set iterations 1000}
|
||||
foreach fuzztype {binary alpha compr} {
|
||||
test "FUZZ stresser with data model $fuzztype" {
|
||||
set err 0
|
||||
for {set i 0} {$i < 10000} {incr i} {
|
||||
for {set i 0} {$i < $iterations} {incr i} {
|
||||
set fuzz [randstring 0 512 $fuzztype]
|
||||
r set foo $fuzz
|
||||
set got [r get foo]
|
||||
@ -48,9 +49,10 @@ start_server {tags {"other"}} {
|
||||
|
||||
tags {consistency} {
|
||||
if {![catch {package require sha1}]} {
|
||||
if {$::accurate} {set numops 10000} else {set numops 1000}
|
||||
test {Check consistency of different data types after a reload} {
|
||||
r flushdb
|
||||
createComplexDataset r 10000
|
||||
createComplexDataset r $numops
|
||||
set dump [csvdump r]
|
||||
set sha1 [r debug digest]
|
||||
r debug reload
|
||||
|
@ -16,7 +16,8 @@ start_server {
|
||||
|
||||
tags {slow} {
|
||||
test {ziplist implementation: value encoding and backlink} {
|
||||
for {set j 0} {$j < 100} {incr j} {
|
||||
if {$::accurate} {set iterations 100} else {set iterations 10}
|
||||
for {set j 0} {$j < $iterations} {incr j} {
|
||||
r del l
|
||||
set l {}
|
||||
for {set i 0} {$i < 200} {incr i} {
|
||||
@ -58,7 +59,7 @@ start_server {
|
||||
}
|
||||
}
|
||||
assert_equal [llength $l] [r llen l]
|
||||
for {set i 0} {$i < 200} {incr i} {
|
||||
for {set i 0} {$i < $len} {incr i} {
|
||||
if {[lindex $l $i] ne [r lindex l $i]} {
|
||||
assert_equal [lindex $l $i] [r lindex l $i]
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ start_server {tags {"zset"}} {
|
||||
} elseif {$encoding == "skiplist"} {
|
||||
r config set zset-max-ziplist-entries 0
|
||||
r config set zset-max-ziplist-value 0
|
||||
set elements 1000
|
||||
if {$::accurate} {set elements 1000} else {set elements 100}
|
||||
} else {
|
||||
puts "Unknown sorted set encoding"
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user