From 3127a3b65933090105700c37e980ac455fce1e65 Mon Sep 17 00:00:00 2001 From: Yicheng Qin Date: Tue, 21 Apr 2015 17:47:13 -0700 Subject: [PATCH] tools/etcd-tester: wait longer for health It dramatically reduce the probability that follower failed to catch up the leader. --- tools/functional-tester/etcd-tester/cluster.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/functional-tester/etcd-tester/cluster.go b/tools/functional-tester/etcd-tester/cluster.go index 947281857..6f0ad511d 100644 --- a/tools/functional-tester/etcd-tester/cluster.go +++ b/tools/functional-tester/etcd-tester/cluster.go @@ -129,7 +129,11 @@ func (c *cluster) Bootstrap() error { func (c *cluster) WaitHealth() error { var err error - for i := 0; i < 10; i++ { + // wait 60s to check cluster health. + // TODO: set it to a reasonable value. It is set that high because + // follower may use long time to catch up the leader when reboot under + // reasonable workload (https://github.com/coreos/etcd/issues/2698) + for i := 0; i < 60; i++ { err = setHealthKey(c.ClientURLs) if err == nil { return nil