summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-01-24 10:10:45 +0100
committerantirez <antirez@gmail.com>2018-01-24 10:24:22 +0100
commit05c1f18d6a2f86825589687efa581bc8764e208b (patch)
treee1a8f14e5e8790a6dce08dd4c496e798aba39a06
parent4acd6973bf0b85c80b85f43e94884f4e6d360ab7 (diff)
downloadredis-05c1f18d6a2f86825589687efa581bc8764e208b.tar.gz
Fix integration test NOREPLICAS error time dependent false positive.
-rw-r--r--tests/integration/replication-2.tcl9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/integration/replication-2.tcl b/tests/integration/replication-2.tcl
index 9446e5cd9..2ff19c3c4 100644
--- a/tests/integration/replication-2.tcl
+++ b/tests/integration/replication-2.tcl
@@ -2,9 +2,12 @@ start_server {tags {"repl"}} {
start_server {} {
test {First server should have role slave after SLAVEOF} {
r -1 slaveof [srv 0 host] [srv 0 port]
- after 1000
- s -1 role
- } {slave}
+ wait_for_condition 50 100 {
+ [s -1 master_link_status] eq {up}
+ } else {
+ fail "Replication not started."
+ }
+ }
test {If min-slaves-to-write is honored, write is accepted} {
r config set min-slaves-to-write 1