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

Method TestBrokenConnection

cpp/src/arrow/flight/test_definitions.cc:108–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 ASSERT_OK(server->Wait());
107}
108void ConnectivityTest::TestBrokenConnection() {
109 std::unique_ptr<FlightServerBase> server = TestFlightServer::Make();
110 ASSERT_OK_AND_ASSIGN(auto location, Location::ForScheme(transport(), "127.0.0.1", 0));
111 FlightServerOptions options(location);
112 ASSERT_OK(server->Init(options));
113
114 std::unique_ptr<FlightClient> client;
115 ASSERT_OK_AND_ASSIGN(location,
116 Location::ForScheme(transport(), "127.0.0.1", server->port()));
117 ASSERT_OK_AND_ASSIGN(client, FlightClient::Connect(location));
118
119 ASSERT_OK(server->Shutdown());
120 ASSERT_OK(server->Wait());
121
122 auto status = client->GetFlightInfo(FlightDescriptor::Command(""));
123 ASSERT_NOT_OK(status);
124 ASSERT_THAT(
125 status.status().code(),
126 ::testing::AnyOf(::arrow::StatusCode::IOError, ::arrow::StatusCode::UnknownError));
127}
128
129//------------------------------------------------------------
130// Tests of data plane methods

Callers

nothing calls this directly

Calls 10

ASSERT_OK_AND_ASSIGNFunction · 0.70
CommandFunction · 0.70
MakeFunction · 0.50
InitMethod · 0.45
portMethod · 0.45
ShutdownMethod · 0.45
WaitMethod · 0.45
GetFlightInfoMethod · 0.45
codeMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected