@@ -23,7 +23,6 @@ import (
23
23
24
24
"github.com/stretchr/testify/require"
25
25
"golang.org/x/sync/errgroup"
26
- "google.golang.org/grpc"
27
26
_ "google.golang.org/grpc/health"
28
27
29
28
clientv3 "go.etcd.io/etcd/client/v3"
@@ -44,9 +43,8 @@ const (
44
43
45
44
func TestFailoverOnDefrag (t * testing.T ) {
46
45
tcs := []struct {
47
- name string
48
- clusterOptions []e2e.EPClusterOption
49
- gRPCDialOptions []grpc.DialOption
46
+ name string
47
+ clusterOptions []e2e.EPClusterOption
50
48
51
49
// common assertion
52
50
expectedMinQPS float64
@@ -62,10 +60,6 @@ func TestFailoverOnDefrag(t *testing.T) {
62
60
e2e .WithExperimentalStopGRPCServiceOnDefrag (true ),
63
61
e2e .WithGoFailEnabled (true ),
64
62
},
65
- gRPCDialOptions : []grpc.DialOption {
66
- grpc .WithDisableServiceConfig (),
67
- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
68
- },
69
63
expectedMinQPS : 20 ,
70
64
expectedMaxFailureRate : 0.01 ,
71
65
},
@@ -76,20 +70,6 @@ func TestFailoverOnDefrag(t *testing.T) {
76
70
e2e .WithExperimentalStopGRPCServiceOnDefrag (false ),
77
71
e2e .WithGoFailEnabled (true ),
78
72
},
79
- gRPCDialOptions : []grpc.DialOption {
80
- grpc .WithDisableServiceConfig (),
81
- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
82
- },
83
- expectedMinQPS : 20 ,
84
- expectedMinFailureRate : 0.25 ,
85
- },
86
- {
87
- name : "defrag blocks one-third of requests with stopGRPCServiceOnDefrag set to true and client health check disabled" ,
88
- clusterOptions : []e2e.EPClusterOption {
89
- e2e .WithClusterSize (3 ),
90
- e2e .WithExperimentalStopGRPCServiceOnDefrag (true ),
91
- e2e .WithGoFailEnabled (true ),
92
- },
93
73
expectedMinQPS : 20 ,
94
74
expectedMinFailureRate : 0.25 ,
95
75
},
@@ -100,10 +80,6 @@ func TestFailoverOnDefrag(t *testing.T) {
100
80
e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , true ),
101
81
e2e .WithGoFailEnabled (true ),
102
82
},
103
- gRPCDialOptions : []grpc.DialOption {
104
- grpc .WithDisableServiceConfig (),
105
- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
106
- },
107
83
expectedMinQPS : 20 ,
108
84
expectedMaxFailureRate : 0.01 ,
109
85
},
@@ -114,20 +90,6 @@ func TestFailoverOnDefrag(t *testing.T) {
114
90
e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , false ),
115
91
e2e .WithGoFailEnabled (true ),
116
92
},
117
- gRPCDialOptions : []grpc.DialOption {
118
- grpc .WithDisableServiceConfig (),
119
- grpc .WithDefaultServiceConfig (`{"loadBalancingPolicy": "round_robin", "healthCheckConfig": {"serviceName": ""}}` ),
120
- },
121
- expectedMinQPS : 20 ,
122
- expectedMinFailureRate : 0.25 ,
123
- },
124
- {
125
- name : "defrag blocks one-third of requests with StopGRPCServiceOnDefrag feature gate set to true and client health check disabled" ,
126
- clusterOptions : []e2e.EPClusterOption {
127
- e2e .WithClusterSize (3 ),
128
- e2e .WithServerFeatureGate ("StopGRPCServiceOnDefrag" , true ),
129
- e2e .WithGoFailEnabled (true ),
130
- },
131
93
expectedMinQPS : 20 ,
132
94
expectedMinFailureRate : 0.25 ,
133
95
},
@@ -151,7 +113,6 @@ func TestFailoverOnDefrag(t *testing.T) {
151
113
DialKeepAliveTime : keepaliveTime ,
152
114
DialKeepAliveTimeout : keepaliveTimeout ,
153
115
Endpoints : endpoints ,
154
- DialOptions : tc .gRPCDialOptions ,
155
116
})
156
117
if cerr != nil {
157
118
return cerr
0 commit comments