etcd-tester:limit max retry backoff delay

grpc uses expoential retry if a connection is lost. grpc will sleep base on exponential delay.
if delay is too large, it slows down tester.
This commit is contained in:
fanmin shi 2016-11-21 10:58:36 -08:00
parent 0326d6fdd3
commit 2ac1c4c9ed

View File

@ -114,7 +114,7 @@ func (ls *leaseStresser) setupOnce() error {
panic("expect keysPerLease to be set")
}
conn, err := grpc.Dial(ls.endpoint, grpc.WithInsecure())
conn, err := grpc.Dial(ls.endpoint, grpc.WithInsecure(), grpc.WithBackoffMaxDelay(1*time.Second))
if err != nil {
return fmt.Errorf("%v (%s)", err, ls.endpoint)
}