solve race in replication-2 test - again (#8491)

this should make it timing independent and also faster in most cases
This commit is contained in:
Oran Agra 2021-02-15 12:50:23 +02:00 committed by GitHub
parent 0bc8c9c8f9
commit 30775bc3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,10 +43,14 @@ start_server {tags {"repl"}} {
r config set min-slaves-max-lag 2
exec kill -SIGSTOP [srv -1 pid]
assert {[r set foo 12345] eq {OK}}
after 4000
wait_for_condition 100 100 {
[catch {r set foo 12345}] != 0
} else {
fail "Master didn't become readonly"
}
catch {r set foo 12345} err
set err
} {NOREPLICAS*}
assert_match {NOREPLICAS*} $err
}
exec kill -SIGCONT [srv -1 pid]
test {min-slaves-to-write is ignored by slaves} {