Emulate DoPut
| 423 | } |
| 424 | // Emulate DoPut |
| 425 | void DataTest::TestDoExchangePut() { |
| 426 | auto descr = FlightDescriptor::Command("put"); |
| 427 | ASSERT_OK_AND_ASSIGN(auto exchange, client_->DoExchange(descr)); |
| 428 | std::unique_ptr<FlightStreamReader> reader = std::move(exchange.reader); |
| 429 | std::unique_ptr<FlightStreamWriter> writer = std::move(exchange.writer); |
| 430 | ASSERT_OK(writer->Begin(ExampleIntSchema())); |
| 431 | RecordBatchVector batches; |
| 432 | ASSERT_OK(ExampleIntBatches(&batches)); |
| 433 | for (const auto& batch : batches) { |
| 434 | ASSERT_OK(writer->WriteRecordBatch(*batch)); |
| 435 | } |
| 436 | ASSERT_OK(writer->DoneWriting()); |
| 437 | ASSERT_OK_AND_ASSIGN(auto chunk, reader->Next()); |
| 438 | ASSERT_NE(nullptr, chunk.app_metadata); |
| 439 | AssertBufferEqual(*chunk.app_metadata, "done"); |
| 440 | ASSERT_OK_AND_ASSIGN(chunk, reader->Next()); |
| 441 | ASSERT_EQ(nullptr, chunk.data); |
| 442 | ASSERT_EQ(nullptr, chunk.app_metadata); |
| 443 | ASSERT_OK(writer->Close()); |
| 444 | } |
| 445 | // Test the echo server |
| 446 | void DataTest::TestDoExchangeEcho() { |
| 447 | auto descr = FlightDescriptor::Command("echo"); |
nothing calls this directly
no test coverage detected