Skip to content

Commit ef9f9cb

Browse files
committed
update test code
1 parent a1221d3 commit ef9f9cb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

xds/internal/resolver/helpers_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828

2929
"github.com/google/go-cmp/cmp"
3030
"github.com/google/go-cmp/cmp/cmpopts"
31+
3132
"google.golang.org/grpc/codes"
3233
"google.golang.org/grpc/internal"
3334
"google.golang.org/grpc/internal/grpctest"
@@ -114,7 +115,6 @@ func buildResolverForTarget(t *testing.T, target resolver.Target, bootstrapConte
114115
select {
115116
case stateCh <- s:
116117
default:
117-
// If channel is full, drop the oldest update to prevent blocking
118118
select {
119119
case <-stateCh:
120120
stateCh <- s
@@ -128,7 +128,6 @@ func buildResolverForTarget(t *testing.T, target resolver.Target, bootstrapConte
128128
select {
129129
case errCh <- err:
130130
default:
131-
// If channel is full, drop the oldest error to prevent blocking
132131
select {
133132
case <-errCh:
134133
errCh <- err
@@ -144,7 +143,6 @@ func buildResolverForTarget(t *testing.T, target resolver.Target, bootstrapConte
144143
t.Fatalf("Failed to build xDS resolver for target %q: %v", target, err)
145144
}
146145
t.Cleanup(func() {
147-
// Drain channels before closing to prevent blocking
148146
go func() {
149147
for range stateCh {
150148
}

0 commit comments

Comments
 (0)