proxygen
|
#include "wangle/bootstrap/ServerBootstrap.h"
#include "wangle/bootstrap/ClientBootstrap.h"
#include "wangle/channel/Handler.h"
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <boost/thread.hpp>
#include <folly/String.h>
#include <folly/experimental/TestUtil.h>
Go to the source code of this file.
Classes | |
class | TestClientPipelineFactory |
class | TestPipelineFactory |
class | TestAcceptor |
class | TestAcceptorFactory |
class | TestHandlerPipeline |
class | TestHandlerPipelineFactory< HandlerPipeline > |
class | TestUDPPipeline |
Typedefs | |
typedef Pipeline< IOBufQueue &, std::unique_ptr< IOBuf > > | BytesPipeline |
typedef ServerBootstrap< BytesPipeline > | TestServer |
typedef ClientBootstrap< BytesPipeline > | TestClient |
Functions | |
TEST (Bootstrap, Basic) | |
TEST (Bootstrap, ServerWithPipeline) | |
TEST (Bootstrap, ServerWithChildHandler) | |
TEST (Bootstrap, ClientServerTest) | |
TEST (Bootstrap, ClientConnectionManagerTest) | |
TEST (Bootstrap, ServerAcceptGroupTest) | |
TEST (Bootstrap, ServerAcceptGroup2Test) | |
TEST (Bootstrap, SharedThreadPool) | |
TEST (Bootstrap, ExistingSocket) | |
TEST (Bootstrap, LoadBalanceHandler) | |
TEST (Bootstrap, UDP) | |
TEST (Bootstrap, UDPClientServerTest) | |
TEST (Bootstrap, UnixServer) | |
TEST (Bootstrap, ServerBindFailure) | |
Variables | |
std::atomic< int > | connections {0} |
typedef Pipeline<IOBufQueue&, std::unique_ptr<IOBuf> > BytesPipeline |
Definition at line 30 of file BootstrapTest.cpp.
typedef ClientBootstrap<BytesPipeline> TestClient |
Definition at line 33 of file BootstrapTest.cpp.
typedef ServerBootstrap<BytesPipeline> TestServer |
Definition at line 32 of file BootstrapTest.cpp.
TEST | ( | Bootstrap | , |
Basic | |||
) |
Definition at line 87 of file BootstrapTest.cpp.
TEST | ( | Bootstrap | , |
ServerWithPipeline | |||
) |
Definition at line 92 of file BootstrapTest.cpp.
TEST | ( | Bootstrap | , |
ServerWithChildHandler | |||
) |
Definition at line 99 of file BootstrapTest.cpp.
TEST | ( | Bootstrap | , |
ClientServerTest | |||
) |
Definition at line 106 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
ClientConnectionManagerTest | |||
) |
Definition at line 126 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
ServerAcceptGroupTest | |||
) |
Definition at line 156 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), folly::EventBase::loop(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
ServerAcceptGroup2Test | |||
) |
Definition at line 184 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), folly::INFO, folly::EventBase::loop(), folly::AsyncServerSocket::newSocket(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
SharedThreadPool | |||
) |
Definition at line 222 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, folly::EventBaseManager::get(), folly::SocketAddress::getAddress(), folly::EventBaseManager::getEventBase(), folly::INFO, folly::EventBase::loop(), folly::AsyncServerSocket::newSocket(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
ExistingSocket | |||
) |
Definition at line 277 of file BootstrapTest.cpp.
References folly::gen::move, and folly::netops::socket().
TEST | ( | Bootstrap | , |
LoadBalanceHandler | |||
) |
Definition at line 310 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), connections, EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), and wangle::BaseClientBootstrap< P >::pipelineFactory().
TEST | ( | Bootstrap | , |
UDP | |||
) |
Definition at line 340 of file BootstrapTest.cpp.
TEST | ( | Bootstrap | , |
UDPClientServerTest | |||
) |
Definition at line 350 of file BootstrapTest.cpp.
References folly::AsyncUDPSocket::bind(), connections, folly::IOBuf::create(), data, EXPECT_EQ, folly::EventBaseManager::get(), TestServer::getAddress(), folly::EventBaseManager::getEventBase(), folly::gen::move, and folly::AsyncUDPSocket::write().
TEST | ( | Bootstrap | , |
UnixServer | |||
) |
Definition at line 380 of file BootstrapTest.cpp.
References wangle::ClientBootstrap< Pipeline >::connect(), EXPECT_EQ, EXPECT_TRUE, folly::EventBaseManager::get(), folly::EventBaseManager::getEventBase(), folly::gen::move, wangle::BaseClientBootstrap< P >::pipelineFactory(), and folly::SocketAddress::setFromPath().
TEST | ( | Bootstrap | , |
ServerBindFailure | |||
) |
Definition at line 404 of file BootstrapTest.cpp.
References EXPECT_EQ, FAIL, folly::SocketAddress::getAddress(), and folly::AsyncServerSocket::newSocket().
std::atomic<int> connections {0} |
Definition at line 285 of file BootstrapTest.cpp.
Referenced by TestHandlerPipeline::read(), TestUDPPipeline::read(), and TEST().