Test sending a schema without any data, as this hits an edge case in the client-side writer.
| 387 | // Test sending a schema without any data, as this hits an edge case |
| 388 | // in the client-side writer. |
| 389 | void DataTest::TestDoExchangeWriteOnlySchema() { |
| 390 | auto descr = FlightDescriptor::Command("counter"); |
| 391 | ASSERT_OK_AND_ASSIGN(auto exchange, client_->DoExchange(descr)); |
| 392 | std::unique_ptr<FlightStreamReader> reader = std::move(exchange.reader); |
| 393 | std::unique_ptr<FlightStreamWriter> writer = std::move(exchange.writer); |
| 394 | auto schema = arrow::schema({field("f1", arrow::int32())}); |
| 395 | ASSERT_OK(writer->Begin(schema)); |
| 396 | ASSERT_OK(writer->WriteMetadata(Buffer::FromString("foo"))); |
| 397 | ASSERT_OK(writer->DoneWriting()); |
| 398 | ASSERT_OK_AND_ASSIGN(auto chunk, reader->Next()); |
| 399 | ASSERT_EQ(nullptr, chunk.data); |
| 400 | ASSERT_NE(nullptr, chunk.app_metadata); |
| 401 | ASSERT_EQ("0", chunk.app_metadata->ToString()); |
| 402 | ASSERT_OK(writer->Close()); |
| 403 | } |
| 404 | // Emulate DoGet |
| 405 | void DataTest::TestDoExchangeGet() { |
| 406 | auto descr = FlightDescriptor::Command("get"); |
nothing calls this directly
no test coverage detected