@@ -35,7 +35,6 @@ import (
35
35
"google.golang.org/grpc/internal/xds/clients/internal/testutils"
36
36
"google.golang.org/grpc/internal/xds/clients/internal/testutils/e2e"
37
37
"google.golang.org/grpc/internal/xds/clients/xdsclient"
38
- xdsclientinternal "google.golang.org/grpc/internal/xds/clients/xdsclient/internal"
39
38
"google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
40
39
41
40
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
@@ -115,12 +114,6 @@ func badListenerResource(t *testing.T, name string) *v3listenerpb.Listener {
115
114
}
116
115
}
117
116
118
- func overrideWatchExpiryTimeout (t * testing.T , watchExpiryTimeout time.Duration ) {
119
- originalWatchExpiryTimeout := xdsclientinternal .WatchExpiryTimeout
120
- xdsclientinternal .WatchExpiryTimeout = watchExpiryTimeout
121
- t .Cleanup (func () { xdsclientinternal .WatchExpiryTimeout = originalWatchExpiryTimeout })
122
- }
123
-
124
117
// verifyNoListenerUpdate verifies that no listener update is received on the
125
118
// provided update channel, and returns an error if an update is received.
126
119
//
@@ -726,11 +719,10 @@ func (s) TestLDSWatch_ExpiryTimerFiresBeforeResponse(t *testing.T) {
726
719
Node : clients.Node {ID : nodeID },
727
720
TransportBuilder : grpctransport .NewBuilder (configs ),
728
721
ResourceTypes : resourceTypes ,
722
+ // Override the default watch expiry timeout.
723
+ WatchExpiryTimeout : defaultTestWatchExpiryTimeout ,
729
724
}
730
725
731
- // Create an xDS client with the above config and override the default
732
- // watch expiry timeout.
733
- overrideWatchExpiryTimeout (t , defaultTestWatchExpiryTimeout )
734
726
client , err := xdsclient .New (xdsClientConfig )
735
727
if err != nil {
736
728
t .Fatalf ("Failed to create xDS client: %v" , err )
@@ -777,11 +769,11 @@ func (s) TestLDSWatch_ValidResponseCancelsExpiryTimerBehavior(t *testing.T) {
777
769
Node : clients.Node {ID : nodeID },
778
770
TransportBuilder : grpctransport .NewBuilder (configs ),
779
771
ResourceTypes : resourceTypes ,
772
+ // Override the default watch expiry timeout.
773
+ WatchExpiryTimeout : defaultTestWatchExpiryTimeout ,
780
774
}
781
775
782
- // Create an xDS client with the above config and override the default
783
- // watch expiry timeout.
784
- overrideWatchExpiryTimeout (t , defaultTestWatchExpiryTimeout )
776
+ // Create an xDS client with the above config.
785
777
client , err := xdsclient .New (xdsClientConfig )
786
778
if err != nil {
787
779
t .Fatalf ("Failed to create xDS client: %v" , err )
0 commit comments