X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/a0573260b0928170d66268eb22be1a5699615275..abe18d0e00f8ef15aac18ce59c17f90627b72e9e:/tests/support/util.tcl?ds=inline diff --git a/tests/support/util.tcl b/tests/support/util.tcl index b9c89aa8..95153111 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -140,12 +140,19 @@ proc findKeyWithType {r type} { return {} } -proc createComplexDataset {r ops} { +proc createComplexDataset {r ops {opt {}}} { for {set j 0} {$j < $ops} {incr j} { set k [randomKey] set k2 [randomKey] set f [randomValue] set v [randomValue] + + if {[lsearch -exact $opt useexpire] != -1} { + if {rand() < 0.1} { + {*}$r expire [randomKey] [randomInt 2] + } + } + randpath { set d [expr {rand()}] } {