Skip to content

Commit

Permalink
fix a flake in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Oct 2, 2024
1 parent 159cde6 commit 7c9f578
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions xds/internal/xdsclient/tests/ads_stream_ack_nack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,7 @@ func (s) TestADS_ACK_NACK_InvalidFirstResponse(t *testing.T) {
return nil
},
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
// The go-control-plane management server continuously resends the
// same resource if NACKed by the client. Hence, we need to use
// `Replace` here instead of `Send`.
streamResponseCh.Replace(resp)
streamResponseCh.Send(resp)
},
})

Expand Down Expand Up @@ -354,10 +351,7 @@ func (s) TestADS_ACK_NACK_ResourceIsNotRequestedAnymore(t *testing.T) {
return nil
},
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
// The go-control-plane management server continuously resends the
// same resource if NACKed by the client. Hence, we need to use
// `Replace` here instead of `Send`.
streamResponseCh.Replace(resp)
streamResponseCh.Send(resp)
},
})

Expand Down

0 comments on commit 7c9f578

Please sign in to comment.