diff options
author | antirez <antirez@gmail.com> | 2012-04-30 10:55:03 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-04-30 11:32:02 +0200 |
commit | 8f984bef2964cab3ddf6b4ea3065fcf7f6bdc36a (patch) | |
tree | 765f6cee449e625d55d0dce89012ecf5e3ce3749 /tests/integration | |
parent | dd418873dbaa71c2496ab7a52828f8881cf8a0ed (diff) | |
download | redis-8f984bef2964cab3ddf6b4ea3065fcf7f6bdc36a.tar.gz |
Properly wait the slave to sync with master in BRPOPLPUSH test.
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/replication.tcl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 71a22f691..18e639d41 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -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] |