diff options
author | Oran Agra <oran@redislabs.com> | 2019-05-05 08:19:52 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2019-05-05 08:25:01 +0300 |
commit | ba809f26d4bd81d23fa929d0c018f235ab298564 (patch) | |
tree | 567a60afcbd58f6d06be7465aa7a25906a73663f /tests/integration/psync2.tcl | |
parent | 0a6090bfd8fbec26f682ff0a1dc7a43699e0c9b7 (diff) | |
download | redis-ba809f26d4bd81d23fa929d0c018f235ab298564.tar.gz |
make replication tests more stable on slow machines
solving few replication related tests race conditions which fail on slow machines
bugfix in slave buffers test: since the test is executed twice, each time with
a different commands count, the threshold for the delta can't be a constant.
Diffstat (limited to 'tests/integration/psync2.tcl')
-rw-r--r-- | tests/integration/psync2.tcl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/integration/psync2.tcl b/tests/integration/psync2.tcl index 8663d6fcc..d1212b640 100644 --- a/tests/integration/psync2.tcl +++ b/tests/integration/psync2.tcl @@ -166,12 +166,15 @@ start_server {} { # Pick a random slave set slave_id [expr {($master_id+1)%5}] set sync_count [status $R($master_id) sync_full] + set sync_partial [status $R($master_id) sync_partial_ok] catch { $R($slave_id) config rewrite $R($slave_id) debug restart } + # note: just waiting for connected_slaves==4 has a race condition since + # we might do the check before the master realized that the slave disconnected wait_for_condition 50 1000 { - [status $R($master_id) connected_slaves] == 4 + [status $R($master_id) sync_partial_ok] == $sync_partial + 1 } else { fail "Replica not reconnecting" } |