Skip to content

Commit 3fac869

Browse files
authored
Fix test, disable expiration until empty buckets are formed (redis#12689)
Test failure on freebsd CI: ``` *** [err]: expire scan should skip dictionaries with lot's of empty buckets in tests/unit/expire.tcl scan didn't handle slot skipping logic. ``` Observation: expiry of keys might happen before the empty buckets are formed and won't help with the expiry skip logic validation. Solution: Disable expiration until the empty buckets are formed.
1 parent 26eb4ce commit 3fac869

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/unit/expire.tcl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,8 @@ start_server {tags {"expire"}} {
836836

837837
start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
838838
test "expire scan should skip dictionaries with lot's of empty buckets" {
839+
r debug set-active-expire 0
840+
839841
# Collect two slots to help determine the expiry scan logic is able
840842
# to go past certain slots which aren't valid for scanning at the given point of time.
841843
# And the next non empyt slot after that still gets scanned and expiration happens.
@@ -860,7 +862,9 @@ start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
860862
r del "{foo}$j"
861863
}
862864

863-
# Verify {foo}5 still exists and remaining got cleaned up
865+
r debug set-active-expire 1
866+
867+
# Verify {foo}100 still exists and remaining got cleaned up
864868
wait_for_condition 20 100 {
865869
[r dbsize] eq 1
866870
} else {
@@ -889,5 +893,5 @@ start_cluster 1 0 {tags {"expire external:skip cluster slow"}} {
889893
} else {
890894
fail "Keys did not actively expire."
891895
}
892-
}
896+
} {} {needs:debug}
893897
}

0 commit comments

Comments
 (0)