tustvold commented on code in PR #6611:
URL: https://github.com/apache/arrow-rs/pull/6611#discussion_r1810850310
##########
arrow-integration-testing/src/flight_server_scenarios/integration_test.rs:
##########
@@ -48,9 +48,13 @@ type Result<T = (), E = Error> = std::result::Result<T, E>;
/// Run a scenario that tests integration testing.
pub async fn scenario_setup(port: u16) -> Result {
let addr = super::listen_on(port).await?;
+ let resolved_port = addr.port();
let service = FlightServiceImpl {
- server_location: format!("grpc+tcp://{addr}"),
+ // See https://github.com/apache/arrow-rs/issues/6577
Review Comment:
IIRC you bind the TCPListener -
https://docs.rs/tokio/1.40.0/tokio/net/struct.TcpListener.html, and get the
address of it
https://docs.rs/tokio/1.40.0/tokio/net/struct.TcpListener.html#method.local_addr
You can then construct a
https://docs.rs/tonic/latest/tonic/transport/server/struct.TcpIncoming.html and
feed this to the tonic builder.
It's a bit convoluted, but it is possible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]