diff --git a/rust/integration-testing/src/flight_server_scenarios.rs b/rust/integration-testing/src/flight_server_scenarios.rs index d23480b3d04..9163b692086 100644 --- a/rust/integration-testing/src/flight_server_scenarios.rs +++ b/rust/integration-testing/src/flight_server_scenarios.rs @@ -32,8 +32,6 @@ pub async fn listen_on(port: &str) -> Result { let listener = TcpListener::bind(addr).await?; let addr = listener.local_addr()?; - // NOTE: Log output used in tests - println!("Server listening on localhost:{}", addr.port()); Ok(addr) } diff --git a/rust/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs b/rust/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs index 8e36dbc1baf..ea7ad3c3385 100644 --- a/rust/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs +++ b/rust/integration-testing/src/flight_server_scenarios/auth_basic_proto.rs @@ -46,7 +46,11 @@ pub async fn scenario_setup(port: &str) -> Result { let addr = super::listen_on(port).await?; let svc = FlightServiceServer::new(service); - Server::builder().add_service(svc).serve(addr).await?; + let server = Server::builder().add_service(svc).serve(addr); + + // NOTE: Log output used in tests to signal server is ready + println!("Server listening on localhost:{}", addr.port()); + server.await?; Ok(()) } diff --git a/rust/integration-testing/src/flight_server_scenarios/integration_test.rs b/rust/integration-testing/src/flight_server_scenarios/integration_test.rs index 6c0225d6b54..ee42a47c9a4 100644 --- a/rust/integration-testing/src/flight_server_scenarios/integration_test.rs +++ b/rust/integration-testing/src/flight_server_scenarios/integration_test.rs @@ -51,8 +51,11 @@ pub async fn scenario_setup(port: &str) -> Result { }; let svc = FlightServiceServer::new(service); - Server::builder().add_service(svc).serve(addr).await?; + let server = Server::builder().add_service(svc).serve(addr); + // NOTE: Log output used in tests to signal server is ready + println!("Server listening on localhost:{}", addr.port()); + server.await?; Ok(()) } diff --git a/rust/integration-testing/src/flight_server_scenarios/middleware.rs b/rust/integration-testing/src/flight_server_scenarios/middleware.rs index 5fdfa21ecaf..1416acc4088 100644 --- a/rust/integration-testing/src/flight_server_scenarios/middleware.rs +++ b/rust/integration-testing/src/flight_server_scenarios/middleware.rs @@ -36,7 +36,11 @@ pub async fn scenario_setup(port: &str) -> Result { let svc = FlightServiceServer::new(service); let addr = super::listen_on(port).await?; - Server::builder().add_service(svc).serve(addr).await?; + let server = Server::builder().add_service(svc).serve(addr); + + // NOTE: Log output used in tests to signal server is ready + println!("Server listening on localhost:{}", addr.port()); + server.await?; Ok(()) }