Skip to content

Commit

Permalink
internal: fix test unset env var AggregateAndDNSSupportEnv (grpc#4454)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed May 18, 2021
1 parent 74c40c9 commit c9c9a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xds/internal/client/cds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (s) TestValidateCluster_Failure(t *testing.T) {

oldAggregateAndDNSSupportEnv := env.AggregateAndDNSSupportEnv
env.AggregateAndDNSSupportEnv = true
defer func() { env.CircuitBreakingSupport = oldAggregateAndDNSSupportEnv }()
defer func() { env.AggregateAndDNSSupportEnv = oldAggregateAndDNSSupportEnv }()
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if update, err := validateClusterAndConstructClusterUpdate(test.cluster); err == nil {
Expand Down Expand Up @@ -308,7 +308,7 @@ func (s) TestValidateCluster_Success(t *testing.T) {
defer func() { env.CircuitBreakingSupport = origCircuitBreakingSupport }()
oldAggregateAndDNSSupportEnv := env.AggregateAndDNSSupportEnv
env.AggregateAndDNSSupportEnv = true
defer func() { env.CircuitBreakingSupport = oldAggregateAndDNSSupportEnv }()
defer func() { env.AggregateAndDNSSupportEnv = oldAggregateAndDNSSupportEnv }()
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
update, err := validateClusterAndConstructClusterUpdate(test.cluster)
Expand Down

0 comments on commit c9c9a75

Please sign in to comment.