Fix potential replication-4 test race condition. (#8583)
Co-authored-by: Oran Agra <oran@redislabs.com>
This commit is contained in:
parent
0bad00d049
commit
5d180d2834
@ -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]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user