From 8bcd823ed7044ff3ce38a2c26b16e2810943c450 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 19 Feb 2016 13:18:51 -0800 Subject: [PATCH] etcd-tester: continue for deadline exceeded --- tools/functional-tester/etcd-tester/stresser.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/functional-tester/etcd-tester/stresser.go b/tools/functional-tester/etcd-tester/stresser.go index 914e31e5c..6c9af05df 100644 --- a/tools/functional-tester/etcd-tester/stresser.go +++ b/tools/functional-tester/etcd-tester/stresser.go @@ -93,6 +93,15 @@ func (s *stresser) Stress() error { }) putcancel() if err != nil { + if grpc.ErrorDesc(err) == context.DeadlineExceeded.Error() { + // This retries when request is triggered at the same time as + // leader failure. When we terminate the leader, the request to + // that leader cannot be processed, and times out. Also requests + // to followers cannot be forwarded to the old leader, so timing out + // as well. We want to keep stressing until the cluster elects a + // new leader and start processing requests again. + continue + } return } s.mu.Lock()