lidavidm commented on a change in pull request #12344:
URL: https://github.com/apache/arrow/pull/12344#discussion_r800055709
##########
File path: cpp/src/arrow/flight/flight_test.cc
##########
@@ -374,6 +374,27 @@ 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);
+ std::thread t([&]() { ASSERT_OK(server->Serve()); });
Review comment:
nit, but actually the server is running as soon as you Init() it - no
need to call Serve
##########
File path: cpp/src/arrow/flight/server.h
##########
@@ -25,6 +25,7 @@
#include <string>
#include <utility>
#include <vector>
+#include <grpcpp/support/time.h>
Review comment:
We can't expose gRPC symbols publically.
##########
File path: cpp/src/arrow/flight/server.h
##########
@@ -25,6 +25,7 @@
#include <string>
#include <utility>
#include <vector>
+#include <grpcpp/support/time.h>
Review comment:
The Shutdown method is templated:
https://grpc.github.io/grpc/cpp/classgrpc_1_1_server_interface.html#a644772d11101318f1424e595dee73ccf
and converts things via
[TimePoint](https://grpc.github.io/grpc/cpp/classgrpc_1_1_time_point.html)
which states it'll take a std::chrono::system_clock::time_point.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]