Skip to content

Commit 2cf64a5

Browse files
committed
use SendContext to ensure no goroutine leaks
1 parent 7c9f578 commit 2cf64a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xds/internal/xdsclient/tests/ads_stream_ack_nack_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func (s) TestADS_ACK_NACK_InvalidFirstResponse(t *testing.T) {
246246
return nil
247247
},
248248
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
249-
streamResponseCh.Send(resp)
249+
streamResponseCh.SendContext(ctx, resp)
250250
},
251251
})
252252

@@ -351,7 +351,7 @@ func (s) TestADS_ACK_NACK_ResourceIsNotRequestedAnymore(t *testing.T) {
351351
return nil
352352
},
353353
OnStreamResponse: func(_ context.Context, _ int64, _ *v3discoverypb.DiscoveryRequest, resp *v3discoverypb.DiscoveryResponse) {
354-
streamResponseCh.Send(resp)
354+
streamResponseCh.SendContext(ctx, resp)
355355
},
356356
})
357357

0 commit comments

Comments
 (0)