solve race in replication-2 test (#8461)

use SIGSTOP instead of DEBUG SLEEP, reduces the test
time by some 2 seconds and avoids failures on slow machines
This commit is contained in:
Oran Agra 2021-02-07 16:22:30 +02:00 committed by GitHub
parent 018f7b7378
commit 02ab14cc2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,17 +39,15 @@ start_server {tags {"repl"}} {
}
test {No write if min-slaves-max-lag is > of the slave lag} {
r -1 deferred 1
r config set min-slaves-to-write 1
r config set min-slaves-max-lag 2
r -1 debug sleep 6
exec kill -SIGSTOP [srv -1 pid]
assert {[r set foo 12345] eq {OK}}
after 4000
catch {r set foo 12345} err
assert {[r -1 read] eq {OK}}
r -1 deferred 0
set err
} {NOREPLICAS*}
exec kill -SIGCONT [srv -1 pid]
test {min-slaves-to-write is ignored by slaves} {
r config set min-slaves-to-write 1