pitrou commented on a change in pull request #7908:
URL: https://github.com/apache/arrow/pull/7908#discussion_r467932307



##########
File path: cpp/src/arrow/flight/flight_test.cc
##########
@@ -1515,6 +1529,26 @@ TEST_F(TestDoPut, DoPutDicts) {
   CheckDoPut(descr, schema, batches);
 }
 
+// Ensure the gRPC server is configured to allow large messages
+// Tests a 32 MiB batch
+TEST_F(TestDoPut, DoPutLargeBatch) {
+  const auto array_length = 32768;
+  auto descr = FlightDescriptor::Path({"floats"});
+  BatchVector batches;
+  std::vector<std::shared_ptr<arrow::Array>> arrays;

Review comment:
       Can you delegate the record batch creation to a helper function, since 
it's done both for DoGet and DoPut tests?

##########
File path: cpp/src/arrow/flight/flight_test.cc
##########
@@ -1105,6 +1110,15 @@ TEST_F(TestFlightClient, DoGetDicts) {
   CheckDoGet(descr, expected_batches, check_endpoints);
 }
 
+// Ensure the gRPC client is configured to allow large messages
+// Tests a 32 MiB batch
+TEST_F(TestFlightClient, DoGetLargeBatch) {
+  BatchVector expected_batches;
+  ASSERT_OK(ExampleLargeBatches(&expected_batches));
+  Ticket ticket{"ticket-large-batch-1"};
+  CheckTicket(ticket, expected_batches);

Review comment:
       I was a bit confused here because I didn't understand that `CheckTicket` 
actually issued a DoGet request. Can you call it `CheckDoGet` instead?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to