Unverified Commit 45d83fb2 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix timing issue in rehash test (#10388)

`Expected '*table size: 4096*' to match '*table size: 8192*'`

This test failed once on daily macOS, the reason is because
the bgsave has not stopped after the kill and `after 200`.
So there is a child process and no rehash triggered.

This commit use `waitForBgsave` to wait for it to finish.
parent 6740e175
...@@ -332,7 +332,8 @@ start_server {tags {"other external:skip"}} { ...@@ -332,7 +332,8 @@ start_server {tags {"other external:skip"}} {
# Hash table should not rehash # Hash table should not rehash
assert_no_match "*table size: 8192*" [r debug HTSTATS 9] assert_no_match "*table size: 8192*" [r debug HTSTATS 9]
exec kill -9 [get_child_pid 0] exec kill -9 [get_child_pid 0]
after 200 waitForBgsave r
after 200 ;# waiting for serverCron
# Hash table should rehash since there is no child process, # Hash table should rehash since there is no child process,
# size is power of two and over 4098, so it is 8192 # size is power of two and over 4098, so it is 8192
......
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