| 95 | } |
| 96 | |
| 97 | Status TestFlightServer::GetFlightInfo(const ServerCallContext& context, |
| 98 | const FlightDescriptor& request, |
| 99 | std::unique_ptr<FlightInfo>* out) { |
| 100 | // Test that Arrow-C++ status codes make it through the transport |
| 101 | if (request.type == FlightDescriptor::DescriptorType::CMD && |
| 102 | request.cmd == "status-outofmemory") { |
| 103 | return Status::OutOfMemory("Sentinel"); |
| 104 | } |
| 105 | |
| 106 | std::vector<FlightInfo> flights = ExampleFlightInfo(); |
| 107 | |
| 108 | for (const auto& info : flights) { |
| 109 | if (info.descriptor().Equals(request)) { |
| 110 | *out = std::make_unique<FlightInfo>(info); |
| 111 | return Status::OK(); |
| 112 | } |
| 113 | } |
| 114 | return Status::Invalid("Flight not found: ", request.ToString()); |
| 115 | } |
| 116 | |
| 117 | Status TestFlightServer::DoGet(const ServerCallContext& context, const Ticket& request, |
| 118 | std::unique_ptr<FlightDataStream>* data_stream) { |
nothing calls this directly
no test coverage detected