]> git.feebdaed.xyz Git - 0xmirror/grpc-go.git/commit
test: Fix goroutine leak in TestParsedTarget_WithCustomDialer (#8698)
authorPranjali-2501 <87357388+Pranjali-2501@users.noreply.github.com>
Mon, 10 Nov 2025 10:30:18 +0000 (16:00 +0530)
committerGitHub <noreply@github.com>
Mon, 10 Nov 2025 10:30:18 +0000 (16:00 +0530)
commitdb4cc9fb1d2a1af2cf0789eb68800f847f200574
treec221c4267a15fdf1040af1d2c66219045d60f54d
parent7472d578b15f718cbe8ca0f5f5a3713093c47b03
test: Fix goroutine leak in TestParsedTarget_WithCustomDialer (#8698)

Fixes #8695

Fixes a goroutine leak in clientconn_parsed_target_test.go where
TestParsedTarget_WithCustomDialer() could leave dialer goroutines
blocked on sending to addrCh if the test finished early or stopped
reading.

This change replaces the blocking channel send with a select statement
using a timeout/context to ensure goroutines can always exit.

RELEASE NOTES: None
clientconn_parsed_target_test.go