Skip to content

Commit

Permalink
xds/resolver: extend test to re-add listener (#6768)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley authored Nov 6, 2023
1 parent 6bed353 commit a5a7ef2
Showing 1 changed file with 11 additions and 0 deletions.
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

0 comments on commit a5a7ef2

Please sign in to comment.