| 863 | CheckBatches(descr, {batch1, batch2}); |
| 864 | } |
| 865 | void DoPutTest::TestUndrained() { |
| 866 | // Ensure if the application doesn't drain all messages, that the |
| 867 | // server/transport does |
| 868 | |
| 869 | auto descr = FlightDescriptor::Command("TestUndrained"); |
| 870 | auto schema = arrow::schema({arrow::field("ints", int64())}); |
| 871 | ASSERT_OK_AND_ASSIGN(auto do_put_result, client_->DoPut(descr, schema)); |
| 872 | std::unique_ptr<FlightStreamWriter> writer = std::move(do_put_result.writer); |
| 873 | std::unique_ptr<FlightMetadataReader> reader = std::move(do_put_result.reader); |
| 874 | auto batch = RecordBatchFromJSON(schema, "[[1], [2], [3], [4]]"); |
| 875 | // These calls may or may not fail depending on how quickly the |
| 876 | // transport reacts, whether it batches, writes, etc. |
| 877 | ARROW_UNUSED(writer->WriteRecordBatch(*batch)); |
| 878 | ARROW_UNUSED(writer->WriteRecordBatch(*batch)); |
| 879 | ARROW_UNUSED(writer->WriteRecordBatch(*batch)); |
| 880 | ARROW_UNUSED(writer->WriteRecordBatch(*batch)); |
| 881 | ASSERT_OK(writer->Close()); |
| 882 | |
| 883 | // We should be able to make another call |
| 884 | CheckDoPut(FlightDescriptor::Command("foo"), schema, {batch, batch}); |
| 885 | } |
| 886 | |
| 887 | //------------------------------------------------------------ |
| 888 | // Test app_metadata in data plane methods |
nothing calls this directly
no test coverage detected