Skip to content

Commit 4cdc587

Browse files
committed
update testutils.ResolverClientConn and other review comments
1 parent 312c736 commit 4cdc587

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

xds/internal/resolver/helpers_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ import (
2424
"testing"
2525
"time"
2626

27-
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
28-
v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
29-
v3discoverypb "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
3027
"github.com/google/go-cmp/cmp"
3128
"github.com/google/go-cmp/cmp/cmpopts"
3229
"google.golang.org/grpc/internal"
@@ -39,6 +36,10 @@ import (
3936
"google.golang.org/grpc/serviceconfig"
4037
xdsresolver "google.golang.org/grpc/xds/internal/resolver"
4138
"google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version"
39+
40+
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
41+
v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
42+
v3discoverypb "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
4243
)
4344

4445
type s struct {
@@ -240,7 +241,6 @@ func waitForResourceNames(ctx context.Context, t *testing.T, namesCh chan []stri
240241
t.Helper()
241242

242243
for ; ctx.Err() == nil; <-time.After(defaultTestShortTimeout) {
243-
t.Logf("easwars: executing the for loop waiting for resource names")
244244
select {
245245
case <-ctx.Done():
246246
case gotNames := <-namesCh:

xds/internal/resolver/watch_service_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import (
3939
// configuration resource after the xDS resolver has successfully resolved the
4040
// service name and pushed an update on the channel. The test verifies that the
4141
// resolver stops requesting the old route configuration resource and requests
42-
// the new resource, and once successfully resolved, sends an update on the
43-
// channel.
42+
// the new resource, and once successfully resolved, verifies that the update
43+
// from the resolver matches expected service config.
4444
func (s) TestServiceWatch_ListenerPointsToNewRouteConfiguration(t *testing.T) {
4545
// Spin up an xDS management server for the test.
4646
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
@@ -97,7 +97,7 @@ func (s) TestServiceWatch_ListenerPointsToNewRouteConfiguration(t *testing.T) {
9797
// Tests the case where the listener resource changes to contain an inline route
9898
// configuration and changes back to having a route configuration resource name.
9999
// Verifies that the expected xDS resource names are requested by the resolver
100-
// and the update pushed to the channel contains the expected service config.
100+
// and that the update from the resolver matches expected service config.
101101
func (s) TestServiceWatch_ListenerPointsToInlineRouteConfiguration(t *testing.T) {
102102
// Spin up an xDS management server for the test.
103103
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)

0 commit comments

Comments
 (0)