summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2021-03-22 10:50:39 +0200
committerGitHub <noreply@github.com>2021-03-22 10:50:39 +0200
commita7c02b19bfe8ca719995d4f3d940b1f27f7f73b8 (patch)
tree9b67cef5eb7177cb1d8a5f13bcfb266289e744d5 /tests
parent0418253a9bd79b7101218c4003ea96757aeba9ae (diff)
downloadredis-a7c02b19bfe8ca719995d4f3d940b1f27f7f73b8.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/replication.tcl6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl
index 8d09c68c1..62b175209 100644
--- a/tests/integration/replication.tcl
+++ b/tests/integration/replication.tcl
@@ -196,9 +196,11 @@ start_server {tags {"repl"}} {
} {master}
test {SLAVEOF should start with link status "down"} {
+ r multi
r slaveof [srv -1 host] [srv -1 port]
- s master_link_status
- } {down}
+ r info replication
+ r exec
+ } {*master_link_status:down*}
test {The role should immediately be changed to "replica"} {
s role