Skip to content

Commit

Permalink
clusterresolver: fix a comment in a test (#7776)
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars authored Oct 25, 2024
1 parent f8e5d8f commit e0a730c
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ func (s) TestAggregateCluster_WithTwoEDSClusters(t *testing.T) {
return nil
}
if len(req.GetResourceNames()) == 0 {
// This is the case for ACKs. Do nothing here.
// This happens at the end of the test when the grpc channel is
// being shut down and it is no longer interested in xDS
// resources.
return nil
}
select {
Expand Down Expand Up @@ -489,11 +491,15 @@ func (s) TestAggregateCluster_WithEDSAndDNS(t *testing.T) {
if req.GetTypeUrl() != version.V3EndpointsURL {
return nil
}
if len(req.GetResourceNames()) > 0 {
select {
case edsResourceCh <- req.GetResourceNames()[0]:
default:
}
if len(req.GetResourceNames()) == 0 {
// This happens at the end of the test when the grpc channel is
// being shut down and it is no longer interested in xDS
// resources.
return nil
}
select {
case edsResourceCh <- req.GetResourceNames()[0]:
default:
}
return nil
},
Expand Down

0 comments on commit e0a730c

Please sign in to comment.