| 115 | } |
| 116 | |
| 117 | Status TestFlightServer::DoGet(const ServerCallContext& context, const Ticket& request, |
| 118 | std::unique_ptr<FlightDataStream>* data_stream) { |
| 119 | // Test for ARROW-5095 |
| 120 | if (request.ticket == "ARROW-5095-fail") { |
| 121 | return Status::UnknownError("Server-side error"); |
| 122 | } |
| 123 | if (request.ticket == "ARROW-5095-success") { |
| 124 | return Status::OK(); |
| 125 | } |
| 126 | if (request.ticket == "ARROW-13253-DoGet-Batch") { |
| 127 | // Make batch > 2GiB in size |
| 128 | ARROW_ASSIGN_OR_RAISE(auto batch, VeryLargeBatch()); |
| 129 | ARROW_ASSIGN_OR_RAISE(auto reader, RecordBatchReader::Make({batch})); |
| 130 | *data_stream = std::make_unique<RecordBatchStream>(std::move(reader)); |
| 131 | return Status::OK(); |
| 132 | } |
| 133 | if (request.ticket == "ticket-stream-error") { |
| 134 | auto reader = std::make_shared<ErrorRecordBatchReader>(); |
| 135 | *data_stream = std::make_unique<RecordBatchStream>(std::move(reader)); |
| 136 | return Status::OK(); |
| 137 | } |
| 138 | |
| 139 | std::shared_ptr<RecordBatchReader> batch_reader; |
| 140 | RETURN_NOT_OK(GetBatchForFlight(request, &batch_reader)); |
| 141 | |
| 142 | *data_stream = std::make_unique<RecordBatchStream>(batch_reader); |
| 143 | return Status::OK(); |
| 144 | } |
| 145 | |
| 146 | Status TestFlightServer::DoPut(const ServerCallContext&, |
| 147 | std::unique_ptr<FlightMessageReader> reader, |
nothing calls this directly
no test coverage detected