test {HINCRBYFLOAT over hash-max-listpack-value encoded with a listpack}{
set original_max_value [lindex [r config get hash-max-ziplist-value] 1]
r config set hash-max-listpack-value 8
# hash's value exceeds hash-max-listpack-value
r del smallhash
r del bighash
r hset smallhash tmp 0
r hset bighash tmp 0
r hincrbyfloat smallhash tmp 0.000005
r hincrbyfloat bighash tmp 0.0000005
assert_encoding listpack smallhash
assert_encoding hashtable bighash
# hash's field exceeds hash-max-listpack-value
r del smallhash
r del bighash
r hincrbyfloat smallhash abcdefgh 1
r hincrbyfloat bighash abcdefghi 1
assert_encoding listpack smallhash
assert_encoding hashtable bighash
r config set hash-max-listpack-value $original_max_value
}
test {Hash ziplist regression test for large keys}{
r hset hash kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk a
r hset hash kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk b