summaryrefslogtreecommitdiff
path: root/tests/support/util.tcl
diff options
context:
space:
mode:
authorAllen Farris <farrisa@amazon.com>2021-01-28 13:18:05 -0800
committerGitHub <noreply@github.com>2021-01-28 13:18:05 -0800
commit0d18a1e85fdb9967419dc9f7a5905452d065c84a (patch)
tree9aedadcd3c0ecd473a87c74801983fc8c538ddcb /tests/support/util.tcl
parent26301897d0f298446f6cc9c21e72484c4488ebe5 (diff)
downloadredis-0d18a1e85fdb9967419dc9f7a5905452d065c84a.tar.gz
implement FAILOVER command (#8315)
Implement FAILOVER command, which coordinates failover between the server and one of its replicas.
Diffstat (limited to 'tests/support/util.tcl')
-rw-r--r--tests/support/util.tcl10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl
index 86f2753c2..e69395994 100644
--- a/tests/support/util.tcl
+++ b/tests/support/util.tcl
@@ -86,12 +86,10 @@ proc waitForBgrewriteaof r {
}
proc wait_for_sync r {
- while 1 {
- if {[status $r master_link_status] eq "down"} {
- after 10
- } else {
- break
- }
+ wait_for_condition 50 100 {
+ [status $r master_link_status] eq "up"
+ } else {
+ fail "replica didn't sync in time"
}
}