@@ -24,9 +24,9 @@ import (
2424 "github.com/stretchr/testify/require"
2525 "golang.org/x/sync/errgroup"
2626 "google.golang.org/grpc"
27- _ "google.golang.org/grpc/health"
2827
2928 clientv3 "go.etcd.io/etcd/client/v3"
29+ "go.etcd.io/etcd/client/v3/healthcheck"
3030 "go.etcd.io/etcd/tests/v3/framework/config"
3131 "go.etcd.io/etcd/tests/v3/framework/e2e"
3232)
@@ -62,10 +62,7 @@ func TestFailoverOnDefrag(t *testing.T) {
6262 e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , true ),
6363 e2e .WithGoFailEnabled (true ),
6464 },
65- gRPCDialOptions : []grpc.DialOption {
66- grpc .WithDisableServiceConfig (),
67- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
68- },
65+ gRPCDialOptions : healthcheck .GRPCClientHealthCheckOptions (),
6966 expectedMinQPS : 20 ,
7067 expectedMaxFailureRate : 0.01 ,
7168 },
@@ -76,10 +73,7 @@ func TestFailoverOnDefrag(t *testing.T) {
7673 e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , false ),
7774 e2e .WithGoFailEnabled (true ),
7875 },
79- gRPCDialOptions : []grpc.DialOption {
80- grpc .WithDisableServiceConfig (),
81- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
82- },
76+ gRPCDialOptions : healthcheck .GRPCClientHealthCheckOptions (),
8377 expectedMinQPS : 20 ,
8478 expectedMinFailureRate : 0.25 ,
8579 },
@@ -100,10 +94,7 @@ func TestFailoverOnDefrag(t *testing.T) {
10094 e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , true ),
10195 e2e .WithGoFailEnabled (true ),
10296 },
103- gRPCDialOptions : []grpc.DialOption {
104- grpc .WithDisableServiceConfig (),
105- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
106- },
97+ gRPCDialOptions : healthcheck .GRPCClientHealthCheckOptions (),
10798 expectedMinQPS : 20 ,
10899 expectedMaxFailureRate : 0.01 ,
109100 },
@@ -114,10 +105,7 @@ func TestFailoverOnDefrag(t *testing.T) {
114105 e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , false ),
115106 e2e .WithGoFailEnabled (true ),
116107 },
117- gRPCDialOptions : []grpc.DialOption {
118- grpc .WithDisableServiceConfig (),
119- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
120- },
108+ gRPCDialOptions : healthcheck .GRPCClientHealthCheckOptions (),
121109 expectedMinQPS : 20 ,
122110 expectedMinFailureRate : 0.25 ,
123111 },
0 commit comments