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

Method TestOverflowClientBatch

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

Source from the content-addressed store, hash-verified

322 }
323}
324void DataTest::TestOverflowClientBatch() {
325 ASSERT_OK_AND_ASSIGN(auto batch, VeryLargeBatch());
326 {
327 // DoPut: check for overflow on large batch
328 auto descr = FlightDescriptor::Path({""});
329 ASSERT_OK_AND_ASSIGN(auto do_put_result, client_->DoPut(descr, batch->schema()));
330 EXPECT_RAISES_WITH_MESSAGE_THAT(
331 Invalid, ::testing::HasSubstr("Cannot send record batches exceeding 2GiB yet"),
332 do_put_result.writer->WriteRecordBatch(*batch));
333 ASSERT_OK(do_put_result.writer->Close());
334 }
335 {
336 // DoExchange: check for overflow on large batch from client
337 auto descr = FlightDescriptor::Command("counter");
338 ASSERT_OK_AND_ASSIGN(auto exchange, client_->DoExchange(descr));
339 auto writer = std::move(exchange.writer);
340 ASSERT_OK(writer->Begin(batch->schema()));
341 EXPECT_RAISES_WITH_MESSAGE_THAT(
342 Invalid, ::testing::HasSubstr("Cannot send record batches exceeding 2GiB yet"),
343 writer->WriteRecordBatch(*batch));
344 ASSERT_OK(writer->Close());
345 }
346}
347void DataTest::TestDoExchange() {
348 auto descr = FlightDescriptor::Command("counter");
349 RecordBatchVector batches;

Callers

nothing calls this directly

Calls 5

CommandFunction · 0.70
BeginMethod · 0.45
schemaMethod · 0.45
WriteRecordBatchMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected