mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4547 from gyuho/timeout
etcd-tester: 10-second timeout for stressers
This commit is contained in:
commit
40d3e0daff
@ -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)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user