MCPcopy Create free account
hub / github.com/apache/arrow / TestDoExchangeNoData

Method TestDoExchangeNoData

cpp/src/arrow/flight/test_definitions.cc:375–386  ·  view source on GitHub ↗

Test pure-metadata DoExchange to ensure nothing blocks waiting for schema messages

Source from the content-addressed store, hash-verified

373// Test pure-metadata DoExchange to ensure nothing blocks waiting for
374// schema messages
375void DataTest::TestDoExchangeNoData() {
376 auto descr = FlightDescriptor::Command("counter");
377 ASSERT_OK_AND_ASSIGN(auto exchange, client_->DoExchange(descr));
378 std::unique_ptr<FlightStreamReader> reader = std::move(exchange.reader);
379 std::unique_ptr<FlightStreamWriter> writer = std::move(exchange.writer);
380 ASSERT_OK(writer->DoneWriting());
381 ASSERT_OK_AND_ASSIGN(auto chunk, reader->Next());
382 ASSERT_EQ(nullptr, chunk.data);
383 ASSERT_NE(nullptr, chunk.app_metadata);
384 ASSERT_EQ("0", chunk.app_metadata->ToString());
385 ASSERT_OK(writer->Close());
386}
387// Test sending a schema without any data, as this hits an edge case
388// in the client-side writer.
389void DataTest::TestDoExchangeWriteOnlySchema() {

Callers

nothing calls this directly

Calls 4

DoneWritingMethod · 0.80
CommandFunction · 0.70
ToStringMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected