X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/d344228734dccb1dc67a1fe7e80825c5e49a8199..c0de45924c4033a8650b627e75b7fd6396c52187:/tests/unit/type/hash.tcl diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 950805d1..dbc1c4cc 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -419,4 +419,15 @@ start_server {tags {"hash"}} { } } } + + test {Stress test the hash ziplist -> hashtable encoding conversion} { + r config set hash-max-ziplist-entries 32 + for {set j 0} {$j < 100} {incr j} { + r del myhash + for {set i 0} {$i < 64} {incr i} { + r hset myhash [randomValue] [randomValue] + } + assert {[r object encoding myhash] eq {hashtable}} + } + } }