Skip to content

Commit

Permalink
Merge pull request #4547 from gyuho/timeout
Browse files Browse the repository at this point in the history
etcd-tester: 10-second timeout for stressers
  • Loading branch information
gyuho committed Feb 17, 2016
2 parents ef2d3fe + 239a6d8 commit 40d3e0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/functional-tester/etcd-tester/stresser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit 40d3e0d

Please sign in to comment.