From ac68f70843cadbd279be7f02a4450db6361114f2 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 27 Jun 2016 20:48:06 -0700 Subject: [PATCH] etcd-tester: match ErrTimeoutDueToLeaderFail stresser in followers should retry when failure is injected to their leader. --- tools/functional-tester/etcd-tester/stresser.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/functional-tester/etcd-tester/stresser.go b/tools/functional-tester/etcd-tester/stresser.go index e00203ade..7e84f29ab 100644 --- a/tools/functional-tester/etcd-tester/stresser.go +++ b/tools/functional-tester/etcd-tester/stresser.go @@ -105,12 +105,22 @@ func (s *stresser) Stress() error { // as well. We want to keep stressing until the cluster elects a // new leader and start processing requests again. shouldContinue = true + + case etcdserver.ErrTimeoutDueToLeaderFail.Error(): + // This retries when request is triggered at the same time as + // leader failure and follower nodes receive time out errors + // from losing their leader. Followers should retry to connect + // to the new leader. + shouldContinue = true + case etcdserver.ErrStopped.Error(): // one of the etcd nodes stopped from failure injection shouldContinue = true + case transport.ErrConnClosing.Desc: // server closed the transport (failure injected node) shouldContinue = true + case rpctypes.ErrNotCapable.Error(): // capability check has not been done (in the beginning) shouldContinue = true