k8s/apiextensions-apiserver/test/integration: block etcd client creation until connection is up

The new etcd balancer (>3.3.14, 3.4.0) uses an asynchronous resolver for
endpoints. Without "WithBlock", the client may return before the
connection is up.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>

Kubernetes-commit: a254d0e2a67645948c9631d4bf11ef60aa26f5ae
This commit is contained in:
Gyuho Lee 2019-08-14 17:28:54 -07:00 committed by Kubernetes Publisher
parent 10e972dc08
commit 1d75397d46
1 changed files with 1 additions and 0 deletions

View File

@ -111,6 +111,7 @@ func newETCD3Client(c storagebackend.TransportConfig) (*clientv3.Client, error)
DialKeepAliveTime: keepaliveTime,
DialKeepAliveTimeout: keepaliveTimeout,
DialOptions: []grpc.DialOption{
grpc.WithBlock(), // block until the underlying connection is up
grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor),
grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor),
},