redict/tests/unit/type
Binbin fd566f4050
Fix for set max entries edge case in setTypeCreate / setTypeMaybeConvert (#12183)
In the judgment in setTypeCreate, we should judge size_hint <= max_entries.

This results in the following inconsistencies:
```
127.0.0.1:6379> config set set-max-intset-entries 5 set-max-listpack-entries 5
OK

127.0.0.1:6379> sadd intset_set1 1 2 3 4 5
(integer) 5
127.0.0.1:6379> object encoding intset_set1
"hashtable"
127.0.0.1:6379> sadd intset_set2 1 2 3 4
(integer) 4
127.0.0.1:6379> sadd intset_set2 5
(integer) 1
127.0.0.1:6379> object encoding intset_set2
"intset"

127.0.0.1:6379> sadd listpack_set1 a 1 2 3 4
(integer) 5
127.0.0.1:6379> object encoding listpack_set1
"hashtable"
127.0.0.1:6379> sadd listpack_set2 a 1 2 3
(integer) 4
127.0.0.1:6379> sadd listpack_set2 4
(integer) 1
127.0.0.1:6379> object encoding listpack_set2
"listpack"
```

This was introduced in #12019, added corresponding tests.
2023-05-16 11:32:21 -07:00
..
hash.tcl Updating missing test cases for Hash commands (#12116) 2023-05-01 21:00:07 +03:00
incr.tcl add test cases for decr decrby on missing key (#12070) 2023-04-19 09:55:56 +03:00
list-2.tcl Minor improvements for list-2 test (#8156) 2020-12-08 16:26:38 +02:00
list-3.tcl Fix quicklist node not being recompressed correctly after inserting a new node before or after it (#10120) 2022-01-16 08:54:40 +02:00
list-common.tcl Add listpack encoding for list (#11303) 2022-11-16 20:29:46 +02:00
list.tcl Fix bug: LPOS RANK LONG_ MIN causes overflow (#12167) 2023-05-14 09:04:33 +03:00
set.tcl Fix for set max entries edge case in setTypeCreate / setTypeMaybeConvert (#12183) 2023-05-16 11:32:21 -07:00
stream-cgroups.tcl reprocess command when client is unblocked on keys (#11012) 2023-01-01 23:35:42 +02:00
stream.tcl Fix XSETID with max_deleted_entry_id issue (#11444) 2022-11-02 16:16:16 +02:00
string.tcl adding missing test cases GET and GETEX (#12125) 2023-05-07 11:46:11 +03:00
zset.tcl Add ZREMRANGEBYLEX basics tests to fix reply-schemas daily (#12021) 2023-04-11 11:14:16 +03:00