Definition at line 85 of file AcceptRoutingHandlerTest.cpp.
86 client_ = std::make_shared<TestClient>();
87 client_->pipelineFactory(std::make_shared<TestClientPipelineFactory>());
std::unique_ptr< TestServer > server_
std::shared_ptr< TestClient > client_
Definition at line 111 of file AcceptRoutingHandlerTest.cpp.
References wangle::Pipeline< R, W >::close(), folly::getEventBase(), and folly::EventBase::runInEventBaseThread().
112 auto clientPipelinePromise =
113 std::make_shared<folly::Promise<DefaultPipeline*>>();
117 VLOG(4) <<
"Client close";
118 clientPipeline->
close().thenValue(
119 [=](
auto&&) { clientPipelinePromise->setValue(clientPipeline); });
123 return clientPipelinePromise->getFuture();
std::enable_if<!std::is_same< T, folly::Unit >::value, folly::Future< folly::Unit > >::type close()
EventBase * getEventBase()
Future< DefaultPipeline * > clientConnectAndWrite()
bool runInEventBaseThread(void(*fn)(T *), T *arg)
EventBase* AcceptRoutingHandlerTest::getEventBase |
( |
| ) |
|
|
inline |
void AcceptRoutingHandlerTest::sendClientException |
( |
DefaultPipeline * |
clientPipeline | ) |
|
|
inline |
void AcceptRoutingHandlerTest::SetUp |
( |
| ) |
|
|
inlineoverridevirtual |
Reimplemented from testing::Test.
Definition at line 41 of file AcceptRoutingHandlerTest.cpp.
48 server_ = std::make_unique<TestServer>();
55 std::make_shared<MockRoutingDataHandlerFactory>();
67 std::shared_ptr<MockAcceptRoutingHandler>(acceptRoutingHandler_));
72 auto ioGroup = std::make_shared<IOThreadPoolExecutor>(
kNumIOThreads);
76 server_->pipeline(acceptPipelineFactory_)->group(ioGroup, ioGroup)->bind(0);
77 server_->getSockets()[0]->getAddress(&
address_);
78 VLOG(4) <<
"Start server at " <<
address_;
std::unique_ptr< TestServer > server_
MockRoutingDataHandler * routingDataHandler_
std::shared_ptr< MockRoutingDataHandlerFactory > routingDataHandlerFactory_
RoutingDataHandler< char >::RoutingData routingData_
DefaultPipeline::Ptr routingPipeline_
MockBytesToBytesHandler * downstreamHandler_
MockAcceptRoutingHandler * acceptRoutingHandler_
std::shared_ptr< MockDownstreamPipelineFactory > downstreamPipelineFactory_
AcceptPipeline::Ptr acceptPipeline_
std::shared_ptr< MockAcceptPipelineFactory > acceptPipelineFactory_
void AcceptRoutingHandlerTest::TearDown |
( |
| ) |
|
|
inlineoverridevirtual |
std::shared_ptr<TestClient> AcceptRoutingHandlerTest::client_ |
|
protected |
int AcceptRoutingHandlerTest::kConnId0 {0} |
|
protected |
int AcceptRoutingHandlerTest::kNumIOThreads {1} |
|
protected |
std::unique_ptr<TestServer> AcceptRoutingHandlerTest::server_ |
|
protected |
The documentation for this class was generated from the following file: