diff options
author | antirez <antirez@gmail.com> | 2012-04-26 11:25:13 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-04-30 11:48:16 +0200 |
commit | 9e066ae05169a4e0f633972e0b3d74dc9a03468f (patch) | |
tree | d53ab96a3638b4f10fddceed573b348e4b746c3a | |
parent | 28500d193f8c9db99def02ff409620b29e731c8c (diff) | |
download | redis-9e066ae05169a4e0f633972e0b3d74dc9a03468f.tar.gz |
Redis test: More reliable BRPOPLPUSH replication test.
Now it uses the new wait_for_condition testing primitive.
Also wait_for_condition implementation was fixed in this commit to properly
escape the expr command and its argument.
-rw-r--r-- | tests/integration/replication.tcl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl index 2c7d98dea..a32857719 100644 --- a/tests/integration/replication.tcl +++ b/tests/integration/replication.tcl @@ -10,8 +10,11 @@ start_server {tags {"repl"}} { set rd [redis_deferring_client] $rd brpoplpush a b 5 r lpush a foo - after 1000 - assert_equal [r debug digest] [r -1 debug digest] + wait_for_condition 50 100 { + [r debug digest] eq [r -1 debug digest] + } else { + fail "Master and slave have different digest: [r debug digest] VS [r -1 debug digest]" + } } test {BRPOPLPUSH replication, list exists} { |