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

Method TestShutdown

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

Source from the content-addressed store, hash-verified

77 ASSERT_OK(server->Shutdown());
78}
79void ConnectivityTest::TestShutdown() {
80 // Regression test for ARROW-15181
81 constexpr int kIterations = 10;
82 ASSERT_OK_AND_ASSIGN(auto location, Location::ForScheme(transport(), "127.0.0.1", 0));
83 for (int i = 0; i < kIterations; i++) {
84 std::unique_ptr<FlightServerBase> server = TestFlightServer::Make();
85
86 FlightServerOptions options(location);
87 ASSERT_OK(server->Init(options));
88 ASSERT_GT(server->port(), 0);
89 std::thread t([&]() { ASSERT_OK(server->Serve()); });
90 ASSERT_OK(server->Shutdown());
91 ASSERT_OK(server->Wait());
92 t.join();
93 }
94}
95void ConnectivityTest::TestShutdownWithDeadline() {
96 std::unique_ptr<FlightServerBase> server = TestFlightServer::Make();
97

Callers

nothing calls this directly

Calls 7

ServeMethod · 0.80
MakeFunction · 0.50
InitMethod · 0.45
portMethod · 0.45
ShutdownMethod · 0.45
WaitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected