MCPcopy Create free account
hub / github.com/apache/brpc / MongoTest

Method MongoTest

test/brpc_mongo_protocol_unittest.cpp:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94class MongoTest : public ::testing::Test{
95protected:
96 MongoTest() {
97 EXPECT_EQ(0, _server.AddService(
98 &_svc, brpc::SERVER_DOESNT_OWN_SERVICE));
99 // Hack: Regard `_server' as running
100 _server._status = brpc::Server::RUNNING;
101 _server._options.mongo_service_adaptor = &_adaptor;
102
103 EXPECT_EQ(0, pipe(_pipe_fds));
104
105 brpc::SocketId id;
106 brpc::SocketOptions options;
107 options.fd = _pipe_fds[1];
108 EXPECT_EQ(0, brpc::Socket::Create(options, &id));
109 EXPECT_EQ(0, brpc::Socket::Address(id, &_socket));
110 };
111
112 virtual ~MongoTest() {};
113 virtual void SetUp() {};

Callers

nothing calls this directly

Calls 1

AddServiceMethod · 0.80

Tested by

no test coverage detected