| 937 | ASSERT_OK(server_->Shutdown()); |
| 938 | } |
| 939 | void AppMetadataTest::TestDoGet() { |
| 940 | Ticket ticket{""}; |
| 941 | ASSERT_OK_AND_ASSIGN(std::unique_ptr<FlightStreamReader> stream, |
| 942 | client_->DoGet(ticket)); |
| 943 | |
| 944 | RecordBatchVector expected_batches; |
| 945 | ASSERT_OK(ExampleIntBatches(&expected_batches)); |
| 946 | |
| 947 | auto num_batches = static_cast<int>(expected_batches.size()); |
| 948 | for (int i = 0; i < num_batches; ++i) { |
| 949 | ASSERT_OK_AND_ASSIGN(auto chunk, stream->Next()); |
| 950 | ASSERT_NE(nullptr, chunk.data); |
| 951 | ASSERT_NE(nullptr, chunk.app_metadata); |
| 952 | ASSERT_BATCHES_EQUAL(*expected_batches[i], *chunk.data); |
| 953 | ASSERT_EQ(std::to_string(i), chunk.app_metadata->ToString()); |
| 954 | } |
| 955 | ASSERT_OK_AND_ASSIGN(auto chunk, stream->Next()); |
| 956 | ASSERT_EQ(nullptr, chunk.data); |
| 957 | } |
| 958 | // Test dictionaries. This tests a corner case in the reader: |
| 959 | // dictionary batches come in between the schema and the first record |
| 960 | // batch, so the server must take care to read application metadata |
nothing calls this directly
no test coverage detected