mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
tests consistently fail on timeout (sleep that's too short). it now takes more time because in #12819 we iterate on all dicts, not just non-empty ones. it passed the PR's CI because it skips the `slow` tag, which might have been misplaced, but now it is probably required. with the fix, the tests take quite a lot of time: ``` [ok]: Redis can trigger resizing (1860 ms) [ok]: Redis can rewind and trigger smaller slot resizing (744 ms) ``` before #12819: ``` [ok]: Redis can trigger resizing (309 ms) [ok]: Redis can rewind and trigger smaller slot resizing (295 ms) ``` failure: https://github.com/redis/redis/actions/runs/7704158180/job/20995931735 ``` *** [err]: expire scan should skip dictionaries with lot's of empty buckets in tests/unit/expire.tcl scan didn't handle slot skipping logic. *** [err]: Redis can trigger resizing in tests/unit/other.tcl Expected '[Dictionary HT] Hash table 0 stats (main hash table): table size: 128 number of elements: 5 [Expires HT] Hash table 0 stats (main hash table): No stats available for empty dictionaries ' to match '*table size: 8*' (context: type eval line 29 cmd {assert_match "*table size: 8*" [r debug HTSTATS 0]} proc ::test) *** [err]: Redis can rewind and trigger smaller slot resizing in tests/unit/other.tcl Expected '[Dictionary HT] Hash table 0 stats (main hash table): table size: 256 number of elements: 10 [Expires HT] Hash table 0 stats (main hash table): No stats available for empty dictionaries ' to match '*table size: 16*' (context: type eval line 27 cmd {assert_match "*table size: 16*" [r debug HTSTATS 0]} proc ::test) ```
This commit is contained in:
parent
45a35a79c7
commit
7c9f41b52b
@ -429,6 +429,7 @@ start_server {tags {"other external:skip"}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start_cluster 1 0 {tags {"other external:skip cluster slow"}} {
|
start_cluster 1 0 {tags {"other external:skip cluster slow"}} {
|
||||||
|
r config set dynamic-hz no hz 500
|
||||||
test "Redis can trigger resizing" {
|
test "Redis can trigger resizing" {
|
||||||
r flushall
|
r flushall
|
||||||
# hashslot(foo) is 12182
|
# hashslot(foo) is 12182
|
||||||
@ -456,8 +457,13 @@ start_cluster 1 0 {tags {"other external:skip cluster slow"}} {
|
|||||||
fail "bgsave did not stop in time."
|
fail "bgsave did not stop in time."
|
||||||
}
|
}
|
||||||
|
|
||||||
after 200;# waiting for serverCron
|
# waiting for serverCron to resize the tables
|
||||||
assert_match "*table size: 8*" [r debug HTSTATS 0]
|
wait_for_condition 1000 10 {
|
||||||
|
[string match {*table size: 8*} [r debug HTSTATS 0]]
|
||||||
|
} else {
|
||||||
|
puts [r debug HTSTATS 0]
|
||||||
|
fail "hash tables weren't resize."
|
||||||
|
}
|
||||||
} {} {needs:debug}
|
} {} {needs:debug}
|
||||||
|
|
||||||
test "Redis can rewind and trigger smaller slot resizing" {
|
test "Redis can rewind and trigger smaller slot resizing" {
|
||||||
@ -485,8 +491,13 @@ start_cluster 1 0 {tags {"other external:skip cluster slow"}} {
|
|||||||
fail "bgsave did not stop in time."
|
fail "bgsave did not stop in time."
|
||||||
}
|
}
|
||||||
|
|
||||||
after 200;# waiting for serverCron
|
# waiting for serverCron to resize the tables
|
||||||
assert_match "*table size: 16*" [r debug HTSTATS 0]
|
wait_for_condition 1000 10 {
|
||||||
|
[string match {*table size: 16*} [r debug HTSTATS 0]]
|
||||||
|
} else {
|
||||||
|
puts [r debug HTSTATS 0]
|
||||||
|
fail "hash tables weren't resize."
|
||||||
|
}
|
||||||
} {} {needs:debug}
|
} {} {needs:debug}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user