@@ -950,34 +950,7 @@ func (s) TestLDSWatch_NACKError(t *testing.T) {
950
950
// receives both good update and error without a new resource request being
951
951
// sent to the management server.
952
952
func (s ) TestLDSWatch_ResourceCaching_NACKError (t * testing.T ) {
953
- firstRequestReceived := false
954
- firstAckReceived := grpcsync .NewEvent ()
955
- secondRequestReceived := grpcsync .NewEvent ()
956
-
957
- mgmtServer := e2e .StartManagementServer (t , e2e.ManagementServerOptions {
958
- OnStreamRequest : func (id int64 , req * v3discoverypb.DiscoveryRequest ) error {
959
- // The first request has an empty version string.
960
- if ! firstRequestReceived && req .GetVersionInfo () == "" {
961
- firstRequestReceived = true
962
- return nil
963
- }
964
- // The first ack has a non-empty version string.
965
- if ! firstAckReceived .HasFired () && req .GetVersionInfo () != "" {
966
- firstAckReceived .Fire ()
967
- return nil
968
- }
969
- // If the request version remains "1" while the nonce keeps
970
- // increasing, it indicates the client is repeatedly NACKing
971
- // updates from the server but not sending any new resource
972
- // request.
973
- if req .GetVersionInfo () == "1" {
974
- return nil
975
- }
976
- // Any requests after the first request and ack, are not expected.
977
- secondRequestReceived .Fire ()
978
- return nil
979
- },
980
- })
953
+ mgmtServer := e2e .StartManagementServer (t , e2e.ManagementServerOptions {})
981
954
982
955
nodeID := uuid .New ().String ()
983
956
bc := e2e .DefaultBootstrapContents (t , nodeID , mgmtServer .Address )
@@ -1020,11 +993,6 @@ func (s) TestLDSWatch_ResourceCaching_NACKError(t *testing.T) {
1020
993
if err := verifyListenerUpdate (ctx , lw1 .updateCh , wantUpdate ); err != nil {
1021
994
t .Fatal (err )
1022
995
}
1023
- select {
1024
- case <- ctx .Done ():
1025
- t .Fatal ("timeout when waiting for receipt of ACK at the management server" )
1026
- case <- firstAckReceived .Done ():
1027
- }
1028
996
1029
997
// Configure the management server to return a single listener resource
1030
998
// which is expected to be NACKed by the client.
@@ -1054,14 +1022,6 @@ func (s) TestLDSWatch_ResourceCaching_NACKError(t *testing.T) {
1054
1022
if err := verifyListenerUpdate (ctx , lw2 .updateCh , wantUpdate ); err != nil {
1055
1023
t .Fatal (err )
1056
1024
}
1057
- // No request should get sent out as part of this watch.
1058
- sCtx , sCancel := context .WithTimeout (ctx , defaultTestShortTimeout )
1059
- defer sCancel ()
1060
- select {
1061
- case <- sCtx .Done ():
1062
- case <- secondRequestReceived .Done ():
1063
- t .Fatal ("xdsClient sent out request instead of using update from cache" )
1064
- }
1065
1025
u , err = lw2 .updateCh .Receive (ctx )
1066
1026
if err != nil {
1067
1027
t .Fatalf ("timeout when waiting for a listener resource from the management server: %v" , err )
0 commit comments