Fix race in replication test (#8679)
Since redis 6.2, redis immediately tries to connect to the master, not waiting for replication cron. in the slow freebsd CI, this test failed and master_link_status was already "up" when INFO was called.
This commit is contained in:
parent
0418253a9b
commit
a7c02b19bf
@ -196,9 +196,11 @@ start_server {tags {"repl"}} {
|
|||||||
} {master}
|
} {master}
|
||||||
|
|
||||||
test {SLAVEOF should start with link status "down"} {
|
test {SLAVEOF should start with link status "down"} {
|
||||||
|
r multi
|
||||||
r slaveof [srv -1 host] [srv -1 port]
|
r slaveof [srv -1 host] [srv -1 port]
|
||||||
s master_link_status
|
r info replication
|
||||||
} {down}
|
r exec
|
||||||
|
} {*master_link_status:down*}
|
||||||
|
|
||||||
test {The role should immediately be changed to "replica"} {
|
test {The role should immediately be changed to "replica"} {
|
||||||
s role
|
s role
|
||||||
|
Loading…
Reference in New Issue
Block a user