Skip to content

xds/resolver: extend test to re-add listener #6768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions xds/internal/resolver/xds_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,17 @@ func (s) TestResolverRemovedWithRPCs(t *testing.T) {
t.Fatalf("Got service config:\n%s \nWant service config:\n%s", cmp.Diff(nil, state.ServiceConfig.Config), cmp.Diff(nil, wantSCParsed.Config))
}
}

// Re-add the listener and expect everything to work again.
configureResourcesOnManagementServer(ctx, t, mgmtServer, nodeID, listeners, routes)
// Read the update pushed by the resolver to the ClientConn.
cs = verifyUpdateFromResolver(ctx, t, stateCh, wantDefaultServiceConfig)

res, err = cs.SelectConfig(iresolver.RPCInfo{Context: ctx, Method: "/service/method"})
if err != nil {
t.Fatalf("cs.SelectConfig(): %v", err)
}
res.OnCommitted()
}

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