Skip to content

Commit 44d77bb

Browse files
committed
A few SORT tests made more resistant to false negatives resulitng from poor randomization of Redis hash function with one byte inputs.
1 parent 01f75bf commit 44d77bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/unit/sort.tcl

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ start_server {
159159

160160
test "SORT with BY <constant> and STORE should still order output" {
161161
r del myset mylist
162-
r sadd myset a b c d e f g h i l m n o p q r s t u v z
162+
r sadd myset a b c d e f g h i l m n o p q r s t u v z aa aaa azz
163163
r sort myset alpha by _ store mylist
164164
r lrange mylist 0 -1
165-
} {a b c d e f g h i l m n o p q r s t u v z}
165+
} {a aa aaa azz b c d e f g h i l m n o p q r s t u v z}
166166

167167
test "SORT will complain with numerical sorting and bad doubles (1)" {
168168
r del myset
@@ -183,12 +183,12 @@ start_server {
183183

184184
test "SORT BY sub-sorts lexicographically if score is the same" {
185185
r del myset
186-
r sadd myset u v z a b c d e f g h i l m n o p q r s t
187-
foreach ele {a b c d e f g h i l m n o p q r s t u v z} {
186+
r sadd myset a b c d e f g h i l m n o p q r s t u v z aa aaa azz
187+
foreach ele {a aa aaa azz b c d e f g h i l m n o p q r s t u v z} {
188188
set score:$ele 100
189189
}
190190
r sort myset by score:*
191-
} {a b c d e f g h i l m n o p q r s t u v z}
191+
} {a aa aaa azz b c d e f g h i l m n o p q r s t u v z}
192192

193193
tags {"slow"} {
194194
set num 100

0 commit comments

Comments
 (0)