Skip to content

Commit

Permalink
[xds_core_e2e_test] ensure server is serving before starting client (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth authored and copybara-github committed Sep 13, 2024
1 parent cdb22f1 commit 15085ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/cpp/end2end/xds/xds_core_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ TEST_P(XdsFederationTest, FederationServer) {
"xdstp://xds.example.com/envoy.config.listener.v3.Listener"
"client/%s?client_listener_resource_name_template_not_in_use");
InitClient(builder);
CreateAndStartBackends(2, /*xds_enabled=*/true);
CreateBackends(2, /*xds_enabled=*/true);
// Eds for new authority balancer.
EdsResourceArgs args =
EdsResourceArgs({{"locality0", CreateEndpointsForBackends()}});
Expand Down Expand Up @@ -1099,6 +1099,13 @@ TEST_P(XdsFederationTest, FederationServer) {
new_server_route_config,
ServerHcmAccessor());
}
// Start backends and wait for them to start serving.
StartAllBackends();
for (const auto& backend : backends_) {
ASSERT_TRUE(backend->notifier()->WaitOnServingStatusChange(
grpc_core::LocalIpAndPort(backend->port()), grpc::StatusCode::OK));
}
// Make sure everything works.
WaitForAllBackends(DEBUG_LOCATION);
}

Expand Down

0 comments on commit 15085ea

Please sign in to comment.