]> git.saurik.com Git - redis.git/blobdiff - tests/unit/type/hash.tcl
Fix test that sometimes returned the swapped object instead of encoding
[redis.git] / tests / unit / type / hash.tcl
index 3fdc05e0a936d3365d0661f419f3b8a0c0644efe..74f6d058e141a06196eec9cb8e3ce85a196de580 100644 (file)
@@ -1,4 +1,4 @@
-start_server default.conf {} {
+start_server {tags {"hash"}} {
     test {HSET/HLEN - Small hash creation} {
         array set smallhash {}
         for {set i 0} {$i < 8} {incr i} {
@@ -15,8 +15,8 @@ start_server default.conf {} {
     } {8}
 
     test {Is the small hash encoded with a zipmap?} {
-        r debug object smallhash
-    } {*zipmap*}
+        assert_encoding zipmap smallhash
+    }
 
     test {HSET/HLEN - Big hash creation} {
         array set bighash {}
@@ -286,4 +286,10 @@ start_server default.conf {} {
         lappend rv [string match "ERR*not an integer*" $smallerr]
         lappend rv [string match "ERR*not an integer*" $bigerr]
     } {1 1}
+
+    test {Hash zipmap regression test for large keys} {
+        r hset hash kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk a
+        r hset hash kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk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