lidavidm commented on a change in pull request #12465:
URL: https://github.com/apache/arrow/pull/12465#discussion_r813995829
##########
File path: cpp/src/arrow/flight/test_util.h
##########
@@ -82,24 +82,43 @@ std::unique_ptr<FlightServerBase> ExampleTestServer();
// Helper to initialize a server and matching client with callbacks to
// populate options.
template <typename T, typename... Args>
-Status MakeServer(std::unique_ptr<FlightServerBase>* server,
+Status MakeServer(const Location& location, std::unique_ptr<FlightServerBase>*
server,
std::unique_ptr<FlightClient>* client,
std::function<Status(FlightServerOptions*)>
make_server_options,
std::function<Status(FlightClientOptions*)>
make_client_options,
Args&&... server_args) {
- Location location;
- RETURN_NOT_OK(Location::ForGrpcTcp("localhost", 0, &location));
*server =
arrow::internal::make_unique<T>(std::forward<Args>(server_args)...);
FlightServerOptions server_options(location);
RETURN_NOT_OK(make_server_options(&server_options));
RETURN_NOT_OK((*server)->Init(server_options));
Location real_location;
- RETURN_NOT_OK(Location::ForGrpcTcp("localhost", (*server)->port(),
&real_location));
+ if ((*server)->port() > 0) {
Review comment:
Removed, it wasn't necessary
--
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]