Skip to content

Commit

Permalink
use SendContext to ensure no goroutine leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Oct 2, 2024
1 parent 7c9f578 commit 2cf64a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xds/internal/xdsclient/tests/ads_stream_ack_nack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (s) TestADS_ACK_NACK_InvalidFirstResponse(t *testing.T) {
return nil
},
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
streamResponseCh.Send(resp)
streamResponseCh.SendContext(ctx, resp)
},
})

Expand Down Expand Up @@ -351,7 +351,7 @@ func (s) TestADS_ACK_NACK_ResourceIsNotRequestedAnymore(t *testing.T) {
return nil
},
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
streamResponseCh.Send(resp)
streamResponseCh.SendContext(ctx, resp)
},
})

Expand Down

0 comments on commit 2cf64a5

Please sign in to comment.