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

Method CheckDoGet

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

Source from the content-addressed store, hash-verified

171 return Status::OK();
172}
173void DataTest::CheckDoGet(
174 const FlightDescriptor& descr, const RecordBatchVector& expected_batches,
175 std::function<void(const std::vector<FlightEndpoint>&)> check_endpoints) {
176 auto expected_schema = expected_batches[0]->schema();
177
178 ASSERT_OK_AND_ASSIGN(auto info, client_->GetFlightInfo(descr));
179 check_endpoints(info->endpoints());
180
181 if (supports_async()) {
182 auto listener = std::make_shared<GetFlightInfoListener>();
183 client_->GetFlightInfoAsync(descr, listener);
184 ASSERT_FINISHES_OK(listener->future);
185 ASSERT_EQ(1, listener->counter);
186 check_endpoints(listener->future.MoveResult()->endpoints());
187 }
188
189 ipc::DictionaryMemo dict_memo;
190 ASSERT_OK_AND_ASSIGN(auto schema, info->GetSchema(&dict_memo));
191 AssertSchemaEqual(*expected_schema, *schema);
192
193 // By convention, fetch the first endpoint
194 Ticket ticket = info->endpoints()[0].ticket;
195 CheckDoGet(ticket, expected_batches);
196}
197void DataTest::CheckDoGet(const Ticket& ticket,
198 const RecordBatchVector& expected_batches) {
199 auto num_batches = static_cast<int>(expected_batches.size());

Callers

nothing calls this directly

Calls 5

supports_asyncFunction · 0.70
schemaMethod · 0.45
GetFlightInfoAsyncMethod · 0.45
sizeMethod · 0.45
ReadNextMethod · 0.45

Tested by

no test coverage detected