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

Function SendMultipleRPC

test/brpc_server_unittest.cpp:1386–1400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1384}
1385
1386void SendMultipleRPC(butil::EndPoint ep, int count) {
1387 brpc::Channel channel;
1388 EXPECT_EQ(0, channel.Init(ep, NULL));
1389
1390 for (int i = 0; i < count; ++i) {
1391 brpc::Controller cntl;
1392 test::EchoRequest req;
1393 test::EchoResponse res;
1394 req.set_message(EXP_REQUEST);
1395 test::EchoService_Stub stub(&channel);
1396 stub.Echo(&cntl, &req, &res, NULL);
1397
1398 EXPECT_EQ(EXP_RESPONSE, res.message()) << cntl.ErrorText();
1399 }
1400}
1401
1402TEST_F(ServerTest, serving_requests) {
1403 EchoServiceImpl echo_svc;

Callers

nothing calls this directly

Calls 4

ErrorTextMethod · 0.80
InitMethod · 0.45
EchoMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected