Unverified Commit 02ab14cc authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

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
parent 018f7b73
...@@ -39,17 +39,15 @@ start_server {tags {"repl"}} { ...@@ -39,17 +39,15 @@ start_server {tags {"repl"}} {
} }
test {No write if min-slaves-max-lag is > of the slave lag} { 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-to-write 1
r config set min-slaves-max-lag 2 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}} assert {[r set foo 12345] eq {OK}}
after 4000 after 4000
catch {r set foo 12345} err catch {r set foo 12345} err
assert {[r -1 read] eq {OK}}
r -1 deferred 0
set err set err
} {NOREPLICAS*} } {NOREPLICAS*}
exec kill -SIGCONT [srv -1 pid]
test {min-slaves-to-write is ignored by slaves} { test {min-slaves-to-write is ignored by slaves} {
r config set min-slaves-to-write 1 r config set min-slaves-to-write 1
......
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