mirror of
https://github.com/redis/redis.git
synced 2026-06-11 01:40:25 -04:00
Fix timing issue for module defrag test (#14305)
These two tests often fail in the slow environment.
1. `Module defrag: late defrag with cursor works` test
`defragtest_datatype_resumes` in a defrag cycle does not always reach 10
times, so increase the threshold and move the assertion of
`defragtest_datatype_resumes` to `wait_for_condition`.
2. `Module defrag: global defrag works` test
Increase the waiting time for this test.
This commit is contained in:
parent
35aacdf80a
commit
e2b8f8ff6d
1 changed files with 4 additions and 4 deletions
|
|
@ -54,14 +54,14 @@ start_server {tags {"modules external:skip"} overrides {{save ""}}} {
|
|||
r frag.create key2 10000 100 1000
|
||||
|
||||
r config set activedefrag yes
|
||||
wait_for_condition 200 50 {
|
||||
[getInfoProperty [r info defragtest_stats] defragtest_defrag_ended] > 0
|
||||
wait_for_condition 1000 50 {
|
||||
[getInfoProperty [r info defragtest_stats] defragtest_defrag_ended] > 0 &&
|
||||
[getInfoProperty [r info defragtest_stats] defragtest_datatype_resumes] > 10
|
||||
} else {
|
||||
fail "Unable to wait for a complete defragmentation cycle to finish"
|
||||
}
|
||||
|
||||
set info [r info defragtest_stats]
|
||||
assert {[getInfoProperty $info defragtest_datatype_resumes] > 10}
|
||||
assert_equal 0 [getInfoProperty $info defragtest_datatype_wrong_cursor]
|
||||
assert_morethan [getInfoProperty $info defragtest_datatype_raw_defragged] 0
|
||||
assert_morethan [getInfoProperty $info defragtest_defrag_started] 0
|
||||
|
|
@ -81,7 +81,7 @@ start_server {tags {"modules external:skip"} overrides {{save ""}}} {
|
|||
r frag.create_frag_global 50000
|
||||
r config set activedefrag yes
|
||||
|
||||
wait_for_condition 200 50 {
|
||||
wait_for_condition 1000 50 {
|
||||
[getInfoProperty [r info defragtest_stats] defragtest_defrag_ended] > 0
|
||||
} else {
|
||||
fail "Unable to wait for a complete defragmentation cycle to finish"
|
||||
|
|
|
|||
Loading…
Reference in a new issue