Skip to content

Commit a5a7ef2

Browse files
authored
xds/resolver: extend test to re-add listener (#6768)
1 parent 6bed353 commit a5a7ef2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

xds/internal/resolver/xds_resolver_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,17 @@ func (s) TestResolverRemovedWithRPCs(t *testing.T) {
595595
t.Fatalf("Got service config:\n%s \nWant service config:\n%s", cmp.Diff(nil, state.ServiceConfig.Config), cmp.Diff(nil, wantSCParsed.Config))
596596
}
597597
}
598+
599+
// Re-add the listener and expect everything to work again.
600+
configureResourcesOnManagementServer(ctx, t, mgmtServer, nodeID, listeners, routes)
601+
// Read the update pushed by the resolver to the ClientConn.
602+
cs = verifyUpdateFromResolver(ctx, t, stateCh, wantDefaultServiceConfig)
603+
604+
res, err = cs.SelectConfig(iresolver.RPCInfo{Context: ctx, Method: "/service/method"})
605+
if err != nil {
606+
t.Fatalf("cs.SelectConfig(): %v", err)
607+
}
608+
res.OnCommitted()
598609
}
599610

600611
// Tests the case where resources returned by the management server are removed.

0 commit comments

Comments
 (0)