]> git.saurik.com Git - redis.git/blobdiff - tests/integration/replication.tcl
popcount() optimization for speed.
[redis.git] / tests / integration / replication.tcl
index 71a22f6917301e249dfaa97d6990b854578172ff..18e639d41f6bab6b40c696143211645f0896db07 100644 (file)
@@ -2,9 +2,13 @@ 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 role] eq {slave} &&
+                [string match {*master_link_status:up*} [r -1 info replication]]
+            } else {
+                fail "Can't turn the instance into a slave"
+            }
+        }
 
         test {BRPOPLPUSH replication, when blocking against empty list} {
             set rd [redis_deferring_client]