]> git.saurik.com Git - redis.git/blobdiff - tests/support/util.tcl
initial rough integration test for replication
[redis.git] / tests / support / util.tcl
index a084df90c2106c60a59763a69fece6349addae9b..8a7c3f1d81f86d6eeb6bf97c0fe73a5e1688ea2f 100644 (file)
@@ -56,6 +56,16 @@ proc waitForBgrewriteaof r {
     }
 }
 
+proc wait_for_sync r {
+    while 1 {
+        if {[status r master_link_status] eq "down"} {
+            after 10
+        } else {
+            break
+        }
+    }
+}
+
 proc randomInt {max} {
     expr {int(rand()*$max)}
 }