| 171 | return Status::OK(); |
| 172 | } |
| 173 | void 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 | } |
| 197 | void DataTest::CheckDoGet(const Ticket& ticket, |
| 198 | const RecordBatchVector& expected_batches) { |
| 199 | auto num_batches = static_cast<int>(expected_batches.size()); |
nothing calls this directly
no test coverage detected