| 207 | // Ad-hoc gRPC-specific tests |
| 208 | |
| 209 | TEST(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 | |
| 227 | TEST(TestFlight, InvalidUriScheme) { |
| 228 | ASSERT_OK_AND_ASSIGN(auto location, Location::Parse("invalid://localhost:1234")); |
nothing calls this directly
no test coverage detected