MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/flight/flight_test.cc:209–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207// Ad-hoc gRPC-specific tests
208
209TEST(TestFlight, ConnectUri) {
210 TestServer server("flight-test-server");
211 ASSERT_OK(server.Start());
212 ASSERT_TRUE(server.IsRunning());
213
214 std::stringstream ss;
215 ss << "grpc://localhost:" << server.port();
216 std::string uri = ss.str();
217
218 std::unique_ptr<FlightClient> client;
219 ASSERT_OK_AND_ASSIGN(auto location1, Location::Parse(uri));
220 ASSERT_OK_AND_ASSIGN(auto location2, Location::Parse(uri));
221 ASSERT_OK_AND_ASSIGN(client, FlightClient::Connect(location1));
222 ASSERT_OK(client->Close());
223 ASSERT_OK_AND_ASSIGN(client, FlightClient::Connect(location2));
224 ASSERT_OK(client->Close());
225}
226
227TEST(TestFlight, InvalidUriScheme) {
228 ASSERT_OK_AND_ASSIGN(auto location, Location::Parse("invalid://localhost:1234"));

Callers

nothing calls this directly

Calls 9

strMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.70
MakeFunction · 0.50
StartMethod · 0.45
IsRunningMethod · 0.45
portMethod · 0.45
CloseMethod · 0.45
InitMethod · 0.45
ListFlightsMethod · 0.45

Tested by

no test coverage detected