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:
Oran Agra 2021-03-22 10:50:39 +02:00 committed by GitHub
parent 0418253a9b
commit a7c02b19bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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