| 219 | class ChannelTest : public ::testing::Test{ |
| 220 | protected: |
| 221 | ChannelTest() |
| 222 | : _ep(butil::IP_ANY, 8787) |
| 223 | , _close_fd_once(false) { |
| 224 | if (!_dummy.options().rpc_pb_message_factory) { |
| 225 | _dummy._options.rpc_pb_message_factory = new brpc::DefaultRpcPBMessageFactory(); |
| 226 | } |
| 227 | |
| 228 | pthread_once(®ister_mock_protocol, register_protocol); |
| 229 | const brpc::InputMessageHandler pairs[] = { |
| 230 | { brpc::policy::ParseRpcMessage, |
| 231 | ProcessRpcRequest, VerifyMyRequest, this, "baidu_std" } |
| 232 | }; |
| 233 | EXPECT_EQ(0, _messenger.AddHandler(pairs[0])); |
| 234 | |
| 235 | EXPECT_EQ(0, _server_list.save(butil::endpoint2str(_ep).c_str())); |
| 236 | _naming_url = std::string("File://") + _server_list.fname(); |
| 237 | }; |
| 238 | |
| 239 | virtual ~ChannelTest(){}; |
| 240 | virtual void SetUp() { |
nothing calls this directly
no test coverage detected