Fix potential replication-4 test race condition. (#8583)

Co-authored-by: Oran Agra <oran@redislabs.com>
This commit is contained in:
Yossi Gottlieb 2021-03-02 18:12:11 +02:00 committed by GitHub
parent 0bad00d049
commit 5d180d2834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,12 +79,16 @@ start_server {tags {"repl"}} {
$master config set min-slaves-max-lag 2 $master config set min-slaves-max-lag 2
$master config set min-slaves-to-write 1 $master config set min-slaves-to-write 1
assert {[$master set foo bar] eq {OK}} assert {[$master set foo bar] eq {OK}}
$slave deferred 1 exec kill -SIGSTOP [srv 0 pid]
$slave debug sleep 6 wait_for_condition 100 100 {
after 4000 [catch {$master set foo bar}] != 0
catch {$master set foo bar} e } else {
set e fail "Master didn't become readonly"
} {NOREPLICAS*} }
catch {$master set foo bar} err
assert_match {NOREPLICAS*} $err
exec kill -SIGCONT [srv 0 pid]
}
} }
} }