mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
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:
parent
018f7b7378
commit
02ab14cc2e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user