Unverified Commit 888e92eb authored by sundb's avatar sundb Committed by GitHub
Browse files

Fix a valgrind test failure due to slowly shutdown (#10038)

This pr is mainly to solve the problem that redis process cannot be exited normally, due to changes in #10003.
When a test uses the `key-load-delay` config to delay loading, but does not reset it at the end of the test, will lead to server wait for the loading to reach the event
loop (once in 2mb) before actually shutting down.
parent 39ced1af
...@@ -944,6 +944,7 @@ test "diskless replication child being killed is collected" { ...@@ -944,6 +944,7 @@ test "diskless replication child being killed is collected" {
set loglines [count_log_lines 0] set loglines [count_log_lines 0]
$replica config set repl-diskless-load swapdb $replica config set repl-diskless-load swapdb
$replica config set key-load-delay 1000000 $replica config set key-load-delay 1000000
$replica config set loading-process-events-interval-bytes 1024
$replica replicaof $master_host $master_port $replica replicaof $master_host $master_port
# wait for the replicas to start reading the rdb # wait for the replicas to start reading the rdb
...@@ -962,6 +963,9 @@ test "diskless replication child being killed is collected" { ...@@ -962,6 +963,9 @@ test "diskless replication child being killed is collected" {
} else { } else {
fail "rdb child didn't terminate" fail "rdb child didn't terminate"
} }
# Speed up shutdown
$replica config set key-load-delay 0
} }
} }
} {} {external:skip} } {} {external:skip}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment