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

Function TEST_F

test/brpc_mongo_protocol_unittest.cpp:154–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152};
153
154TEST_F(MongoTest, process_request_logoff) {
155 brpc::mongo_head_t header = { 0, 0, 0, 0 };
156 header.op_code = brpc::MONGO_OPCODE_REPLY;
157 header.message_length = sizeof(header) + EXP_REQUEST.length();
158 butil::IOBuf total_buf;
159 total_buf.append(static_cast<const void*>(&header), sizeof(header));
160 total_buf.append(EXP_REQUEST);
161 brpc::ParseResult req_pr = brpc::policy::ParseMongoMessage(
162 &total_buf, _socket.get(), false, &_server);
163 ASSERT_EQ(brpc::PARSE_OK, req_pr.error());
164 _server._status = brpc::Server::READY;
165 ProcessMessage(brpc::policy::ProcessMongoRequest, req_pr.message(), false);
166 ASSERT_EQ(1ll, _server._nerror_bvar.get_value());
167}
168
169TEST_F(MongoTest, process_request_failed_socket) {
170 brpc::mongo_head_t header = { 0, 0, 0, 0 };

Callers

nothing calls this directly

Calls 15

ParseMongoMessageFunction · 0.85
fetchMethod · 0.80
lengthMethod · 0.45
appendMethod · 0.45
getMethod · 0.45
errorMethod · 0.45
messageMethod · 0.45
get_valueMethod · 0.45
SetFailedMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected