Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
30775bc3
Unverified
Commit
30775bc3
authored
Feb 15, 2021
by
Oran Agra
Committed by
GitHub
Feb 15, 2021
Browse files
solve race in replication-2 test - again (#8491)
this should make it timing independent and also faster in most cases
parent
0bc8c9c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/integration/replication-2.tcl
View file @
30775bc3
...
@@ -43,10 +43,14 @@ start_server {tags {"repl"}} {
...
@@ -43,10 +43,14 @@ start_server {tags {"repl"}} {
r config set min-slaves-max-lag 2
r config set min-slaves-max-lag 2
exec kill -SIGSTOP
[
srv -1 pid
]
exec kill -SIGSTOP
[
srv -1 pid
]
assert
{[
r set foo 12345
]
eq
{
OK
}}
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
catch
{
r set foo 12345
}
err
set
err
assert_match
{
NOREPLICAS*
}
$
err
}
{
NOREPLICAS*
}
}
exec kill -SIGCONT
[
srv -1 pid
]
exec kill -SIGCONT
[
srv -1 pid
]
test
{
min-slaves-to-write is ignored by slaves
}
{
test
{
min-slaves-to-write is ignored by slaves
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment