solve race in expiration test (#10192)
Failed on a non-valgrind run. on this line: ``` assert_equal 0 [$slave exists k] ``` the condition in `keyIsExpired` is `now > when`. so if the test is really fast, maybe it can get to EXISTS exactly 1000 milliseconds after the expiration was set, and the key isn't yet gone)
This commit is contained in:
parent
c79389f032
commit
da48a81290
@ -103,12 +103,12 @@ start_server {tags {"repl external:skip"}} {
|
||||
wait_for_ofs_sync $master $slave
|
||||
exec kill -SIGSTOP [srv 0 pid]
|
||||
$master incr k
|
||||
after 1000
|
||||
after 1001
|
||||
# Stopping the replica for one second to makes sure the INCR arrives
|
||||
# to the replica after the key is logically expired.
|
||||
exec kill -SIGCONT [srv 0 pid]
|
||||
wait_for_ofs_sync $master $slave
|
||||
# Check that k is locigally expired but is present in the replica.
|
||||
# Check that k is logically expired but is present in the replica.
|
||||
assert_equal 0 [$slave exists k]
|
||||
$slave debug object k ; # Raises exception if k is gone.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user