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

Method TestOverflowServerBatch

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

Source from the content-addressed store, hash-verified

298 status);
299}
300void DataTest::TestOverflowServerBatch() {
301 // Regression test for ARROW-13253
302 // N.B. this is rather a slow and memory-hungry test
303 {
304 // DoGet: check for overflow on large batch
305 Ticket ticket{"ARROW-13253-DoGet-Batch"};
306 std::unique_ptr<FlightStreamReader> stream;
307 ASSERT_OK_AND_ASSIGN(stream, client_->DoGet(ticket));
308 FlightStreamChunk chunk;
309 EXPECT_RAISES_WITH_MESSAGE_THAT(
310 Invalid, ::testing::HasSubstr("Cannot send record batches exceeding 2GiB yet"),
311 stream->Next());
312 }
313 {
314 // DoExchange: check for overflow on large batch from server
315 auto descr = FlightDescriptor::Command("large_batch");
316 ASSERT_OK_AND_ASSIGN(auto do_exchange_result, client_->DoExchange(descr));
317 RecordBatchVector batches;
318 EXPECT_RAISES_WITH_MESSAGE_THAT(
319 Invalid, ::testing::HasSubstr("Cannot send record batches exceeding 2GiB yet"),
320 do_exchange_result.reader->ToRecordBatches().Value(&batches));
321 ARROW_UNUSED(do_exchange_result.writer->Close());
322 }
323}
324void DataTest::TestOverflowClientBatch() {
325 ASSERT_OK_AND_ASSIGN(auto batch, VeryLargeBatch());
326 {

Callers

nothing calls this directly

Calls 7

ASSERT_OK_AND_ASSIGNFunction · 0.70
CommandFunction · 0.70
DoGetMethod · 0.45
NextMethod · 0.45
ValueMethod · 0.45
ToRecordBatchesMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected