| 43 | namespace arrow::flight { |
| 44 | |
| 45 | Status TestServer::Start(const std::vector<std::string>& extra_args) { |
| 46 | server_process_ = std::make_unique<util::Process>(); |
| 47 | ARROW_RETURN_NOT_OK(server_process_->SetExecutable(executable_name_)); |
| 48 | std::vector<std::string> args = {}; |
| 49 | if (unix_sock_.empty()) { |
| 50 | args.push_back("-port"); |
| 51 | args.push_back(std::to_string(port_)); |
| 52 | } else { |
| 53 | args.push_back("-server_unix"); |
| 54 | args.push_back(unix_sock_); |
| 55 | } |
| 56 | args.insert(args.end(), extra_args.begin(), extra_args.end()); |
| 57 | server_process_->SetArgs(args); |
| 58 | ARROW_RETURN_NOT_OK(server_process_->Execute()); |
| 59 | std::cout << "Server running with pid " << server_process_->pid() << std::endl; |
| 60 | return Status::OK(); |
| 61 | } |
| 62 | |
| 63 | void TestServer::Stop() { server_process_ = nullptr; } |
| 64 |
no test coverage detected