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

Function main

cpp/src/arrow/flight/integration_tests/test_integration_server.cc:185–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183std::unique_ptr<arrow::flight::FlightServerBase> g_server;
184
185int main(int argc, char** argv) {
186 gflags::SetUsageMessage("Integration testing server for Flight.");
187 gflags::ParseCommandLineFlags(&argc, &argv, true);
188
189 std::shared_ptr<arrow::flight::integration_tests::Scenario> scenario;
190
191 if (!FLAGS_scenario.empty()) {
192 ARROW_CHECK_OK(
193 arrow::flight::integration_tests::GetScenario(FLAGS_scenario, &scenario));
194 } else {
195 scenario =
196 std::make_shared<arrow::flight::integration_tests::IntegrationTestScenario>();
197 }
198 arrow::flight::Location location;
199 ARROW_CHECK_OK(
200 arrow::flight::Location::ForGrpcTcp("0.0.0.0", FLAGS_port).Value(&location));
201 arrow::flight::FlightServerOptions options(location);
202
203 ARROW_CHECK_OK(scenario->MakeServer(&g_server, &options));
204
205 ARROW_CHECK_OK(g_server->Init(options));
206 // Exit with a clean error code (0) on SIGTERM
207 ARROW_CHECK_OK(g_server->SetShutdownOnSignals({SIGTERM}));
208
209 std::cout << "Server listening on localhost:" << g_server->port() << std::endl;
210 ARROW_CHECK_OK(g_server->Serve());
211 return 0;
212}

Callers

nothing calls this directly

Calls 8

GetScenarioFunction · 0.85
SetShutdownOnSignalsMethod · 0.80
ServeMethod · 0.80
emptyMethod · 0.45
ValueMethod · 0.45
MakeServerMethod · 0.45
InitMethod · 0.45
portMethod · 0.45

Tested by

no test coverage detected