Skip to content

Commit

Permalink
[C++] Simplify test init
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Sep 13, 2022
1 parent 3c96e13 commit a8ff5fb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cpp/src/arrow/flight/sql/acero_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@ using arrow::internal::checked_cast;
class TestAcero : public ::testing::Test {
public:
void SetUp() override {
ASSERT_OK_AND_ASSIGN(auto location, Location::ForGrpcTcp("0.0.0.0", 0));
ASSERT_OK_AND_ASSIGN(auto location, Location::ForGrpcTcp("localhost", 0));
flight::FlightServerOptions options(location);

ASSERT_OK_AND_ASSIGN(server_, acero_example::MakeAceroServer());
ASSERT_OK(server_->Init(options));

std::stringstream ss;
ss << "grpc://localhost:" << server_->port();

ASSERT_OK_AND_ASSIGN(auto client_location, Location::Parse(ss.str()));
ASSERT_OK_AND_ASSIGN(auto client, FlightClient::Connect(client_location));

ASSERT_OK_AND_ASSIGN(auto client, FlightClient::Connect(server_->location()));
client_.reset(new FlightSqlClient(std::move(client)));
}

Expand Down

0 comments on commit a8ff5fb

Please sign in to comment.