Emulate DoGet
| 403 | } |
| 404 | // Emulate DoGet |
| 405 | void DataTest::TestDoExchangeGet() { |
| 406 | auto descr = FlightDescriptor::Command("get"); |
| 407 | ASSERT_OK_AND_ASSIGN(auto exchange, client_->DoExchange(descr)); |
| 408 | std::unique_ptr<FlightStreamReader> reader = std::move(exchange.reader); |
| 409 | std::unique_ptr<FlightStreamWriter> writer = std::move(exchange.writer); |
| 410 | ASSERT_OK_AND_ASSIGN(auto server_schema, reader->GetSchema()); |
| 411 | AssertSchemaEqual(*ExampleIntSchema(), *server_schema); |
| 412 | RecordBatchVector batches; |
| 413 | ASSERT_OK(ExampleIntBatches(&batches)); |
| 414 | for (const auto& batch : batches) { |
| 415 | ASSERT_OK_AND_ASSIGN(auto chunk, reader->Next()); |
| 416 | ASSERT_NE(nullptr, chunk.data); |
| 417 | AssertBatchesEqual(*batch, *chunk.data); |
| 418 | } |
| 419 | ASSERT_OK_AND_ASSIGN(auto chunk, reader->Next()); |
| 420 | ASSERT_EQ(nullptr, chunk.data); |
| 421 | ASSERT_EQ(nullptr, chunk.app_metadata); |
| 422 | ASSERT_OK(writer->Close()); |
| 423 | } |
| 424 | // Emulate DoPut |
| 425 | void DataTest::TestDoExchangePut() { |
| 426 | auto descr = FlightDescriptor::Command("put"); |
nothing calls this directly
no test coverage detected