| 979 | ASSERT_EQ(nullptr, chunk.data); |
| 980 | } |
| 981 | void AppMetadataTest::TestDoPut() { |
| 982 | std::shared_ptr<Schema> schema = ExampleIntSchema(); |
| 983 | ASSERT_OK_AND_ASSIGN(auto do_put_result, client_->DoPut(FlightDescriptor{}, schema)); |
| 984 | std::unique_ptr<FlightStreamWriter> writer = std::move(do_put_result.writer); |
| 985 | |
| 986 | RecordBatchVector expected_batches; |
| 987 | ASSERT_OK(ExampleIntBatches(&expected_batches)); |
| 988 | |
| 989 | std::shared_ptr<RecordBatch> chunk; |
| 990 | std::shared_ptr<Buffer> metadata; |
| 991 | auto num_batches = static_cast<int>(expected_batches.size()); |
| 992 | for (int i = 0; i < num_batches; ++i) { |
| 993 | ASSERT_OK(writer->WriteWithMetadata(*expected_batches[i], |
| 994 | Buffer::FromString(std::to_string(i)))); |
| 995 | } |
| 996 | // Transports may behave unpredictably if streams are not |
| 997 | // drained. So explicitly close to see if the transport misbehaves |
| 998 | // (e.g. gRPC will hang if the Flight transport layer doesn't drain |
| 999 | // messages) |
| 1000 | ASSERT_OK(writer->Close()); |
| 1001 | } |
| 1002 | // Test DoPut() with dictionaries. This tests a corner case in the |
| 1003 | // server-side reader; see DoGetDictionaries above. |
| 1004 | void AppMetadataTest::TestDoPutDictionaries() { |
nothing calls this directly
no test coverage detected