From 239a6d89c5a80f1bc68bbfa5c3de38e63493e2a0 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 17 Feb 2016 15:31:24 -0800 Subject: [PATCH] etcd-tester: 10-second timeout for stressers For https://github.com/coreos/etcd/issues/4477. --- tools/functional-tester/etcd-tester/stresser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/functional-tester/etcd-tester/stresser.go b/tools/functional-tester/etcd-tester/stresser.go index 3ba71264a0a..914e31e5c69 100644 --- a/tools/functional-tester/etcd-tester/stresser.go +++ b/tools/functional-tester/etcd-tester/stresser.go @@ -83,7 +83,10 @@ func (s *stresser) Stress() error { go func(i int) { defer wg.Done() for { - putctx, putcancel := context.WithTimeout(ctx, 5*time.Second) + // TODO: 10-second is enough timeout to cover leader failure + // and immediate leader election. Find out what other cases this + // could be timed out. + putctx, putcancel := context.WithTimeout(ctx, 10*time.Second) _, err := kvc.Put(putctx, &pb.PutRequest{ Key: []byte(fmt.Sprintf("foo%d", rand.Intn(s.KeySuffixRange))), Value: []byte(randStr(s.KeySize)),