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

Method SofaTest

test/brpc_sofa_pbrpc_protocol_unittest.cpp:90–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88class SofaTest : public ::testing::Test{
89protected:
90 SofaTest() {
91 EXPECT_EQ(0, _server.AddService(
92 &_svc, brpc::SERVER_DOESNT_OWN_SERVICE));
93 // Hack: Regard `_server' as running
94 _server._status = brpc::Server::RUNNING;
95 // Sofa doesn't support authentication
96 // _server._options.auth = &_auth;
97
98 EXPECT_EQ(0, pipe(_pipe_fds));
99
100 brpc::SocketId id;
101 brpc::SocketOptions options;
102 options.fd = _pipe_fds[1];
103 EXPECT_EQ(0, brpc::Socket::Create(options, &id));
104 EXPECT_EQ(0, brpc::Socket::Address(id, &_socket));
105 };
106
107 virtual ~SofaTest() {};
108 virtual void SetUp() {};

Callers

nothing calls this directly

Calls 1

AddServiceMethod · 0.80

Tested by

no test coverage detected