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

Method SetUp

cpp/src/arrow/flight/flight_test.cc:843–871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

841class TestPropagatingMiddleware : public ::testing::Test {
842 public:
843 void SetUp() {
844 server_middleware_ = std::make_shared<TracingTestServerMiddlewareFactory>();
845 second_client_middleware_ = std::make_shared<PropagatingClientMiddlewareFactory>();
846 client_middleware_ = std::make_shared<PropagatingClientMiddlewareFactory>();
847
848 std::unique_ptr<FlightClient> server_client;
849 ASSERT_OK(MakeServer<ReportContextTestServer>(
850 &second_server_, &server_client,
851 [&](FlightServerOptions* options) {
852 options->middleware.push_back({"tracing", server_middleware_});
853 return Status::OK();
854 },
855 [&](FlightClientOptions* options) {
856 options->middleware.push_back(second_client_middleware_);
857 return Status::OK();
858 }));
859
860 ASSERT_OK(MakeServer<PropagatingTestServer>(
861 &first_server_, &client_,
862 [&](FlightServerOptions* options) {
863 options->middleware.push_back({"tracing", server_middleware_});
864 return Status::OK();
865 },
866 [&](FlightClientOptions* options) {
867 options->middleware.push_back(client_middleware_);
868 return Status::OK();
869 },
870 std::move(server_client)));
871 }
872
873 void ValidateStatus(const Status& status, const FlightMethod& method) {
874 ASSERT_EQ(1, client_middleware_->received_headers_);

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected