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

Method TestWriteAfterClose

cpp/src/arrow/ipc/read_write_test.cc:1622–1636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1620 }
1621
1622 void TestWriteAfterClose() {
1623 // Part of GH-35095.
1624 std::shared_ptr<RecordBatch> batch_ints;
1625 ASSERT_OK(MakeIntRecordBatch(&batch_ints));
1626
1627 auto schema = batch_ints->schema();
1628
1629 WriterHelper writer_helper;
1630 ASSERT_OK(writer_helper.Init(schema, IpcWriteOptions::Defaults()));
1631 ASSERT_OK(writer_helper.WriteBatch(batch_ints));
1632 ASSERT_OK(writer_helper.Finish());
1633
1634 // Write after close raises status
1635 ASSERT_RAISES(Invalid, writer_helper.WriteBatch(batch_ints));
1636 }
1637
1638 void TestWriteDifferentSchema() {
1639 // Test writing batches with a different schema than the RecordBatchWriter

Callers

nothing calls this directly

Calls 6

MakeIntRecordBatchFunction · 0.85
DefaultsFunction · 0.50
schemaMethod · 0.45
InitMethod · 0.45
WriteBatchMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected