@@ -35,7 +35,6 @@ import (
3535 "google.golang.org/grpc/internal/xds/clients/internal/testutils"
3636 "google.golang.org/grpc/internal/xds/clients/internal/testutils/e2e"
3737 "google.golang.org/grpc/internal/xds/clients/xdsclient"
38- xdsclientinternal "google.golang.org/grpc/internal/xds/clients/xdsclient/internal"
3938 "google.golang.org/grpc/internal/xds/clients/xdsclient/internal/xdsresource"
4039
4140 v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
@@ -115,12 +114,6 @@ func badListenerResource(t *testing.T, name string) *v3listenerpb.Listener {
115114 }
116115}
117116
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-
124117// verifyNoListenerUpdate verifies that no listener update is received on the
125118// provided update channel, and returns an error if an update is received.
126119//
@@ -726,11 +719,10 @@ func (s) TestLDSWatch_ExpiryTimerFiresBeforeResponse(t *testing.T) {
726719 Node : clients.Node {ID : nodeID },
727720 TransportBuilder : grpctransport .NewBuilder (configs ),
728721 ResourceTypes : resourceTypes ,
722+ // Override the default watch expiry timeout.
723+ WatchExpiryTimeout : defaultTestWatchExpiryTimeout ,
729724 }
730725
731- // Create an xDS client with the above config and override the default
732- // watch expiry timeout.
733- overrideWatchExpiryTimeout (t , defaultTestWatchExpiryTimeout )
734726 client , err := xdsclient .New (xdsClientConfig )
735727 if err != nil {
736728 t .Fatalf ("Failed to create xDS client: %v" , err )
@@ -777,11 +769,11 @@ func (s) TestLDSWatch_ValidResponseCancelsExpiryTimerBehavior(t *testing.T) {
777769 Node : clients.Node {ID : nodeID },
778770 TransportBuilder : grpctransport .NewBuilder (configs ),
779771 ResourceTypes : resourceTypes ,
772+ // Override the default watch expiry timeout.
773+ WatchExpiryTimeout : defaultTestWatchExpiryTimeout ,
780774 }
781775
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.
785777 client , err := xdsclient .New (xdsClientConfig )
786778 if err != nil {
787779 t .Fatalf ("Failed to create xDS client: %v" , err )
0 commit comments