rok commented on a change in pull request #12344: URL: https://github.com/apache/arrow/pull/12344#discussion_r801599864
########## File path: cpp/src/arrow/flight/flight_test.cc ########## @@ -374,6 +374,24 @@ TEST(TestFlight, ServeShutdown) { } } +TEST(TestFlight, ServeShutdownWithDeadline) { + constexpr int kIterations = 10; + for (int i = 0; i < kIterations; i++) { + Location location; + std::unique_ptr<FlightServerBase> server = ExampleTestServer(); + + ASSERT_OK(Location::ForGrpcTcp("localhost", 0, &location)); + FlightServerOptions options(location); + ASSERT_OK(server->Init(options)); + ASSERT_GT(server->port(), 0); + + auto deadline = std::chrono::system_clock::now() + std::chrono::microseconds(10); + + ASSERT_OK(server->Shutdown(&deadline)); + ASSERT_OK(server->Wait()); + } Review comment: ```suggestion Location location; std::unique_ptr<FlightServerBase> server = ExampleTestServer(); ASSERT_OK(Location::ForGrpcTcp("localhost", 0, &location)); FlightServerOptions options(location); ASSERT_OK(server->Init(options)); ASSERT_GT(server->port(), 0); auto deadline = std::chrono::system_clock::now() + std::chrono::microseconds(10); ASSERT_OK(server->Shutdown(&deadline)); ASSERT_OK(server->Wait()); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org