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

Method TestStatus

test/brpc_builtin_service_unittest.cpp:195–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 }
194
195 void TestStatus(bool use_html) {
196 std::string expect_type = (use_html ? "text/html" : "text/plain");
197 brpc::StatusService service;
198 brpc::StatusRequest req;
199 brpc::StatusResponse res;
200 brpc::Controller cntl;
201 ClosureChecker done;
202 SetUpController(&cntl, use_html);
203 EchoServiceImpl echo_svc;
204 ASSERT_EQ(0, _server.AddService(
205 &echo_svc, brpc::SERVER_DOESNT_OWN_SERVICE));
206 service.default_method(&cntl, &req, &res, &done);
207 EXPECT_FALSE(cntl.Failed());
208 EXPECT_EQ(expect_type, cntl.http_response().content_type());
209 ASSERT_EQ(0, _server.RemoveService(&echo_svc));
210 }
211
212 void TestVLog(bool use_html) {
213#if !BRPC_WITH_GLOG

Callers

nothing calls this directly

Calls 4

AddServiceMethod · 0.80
RemoveServiceMethod · 0.80
default_methodMethod · 0.45
FailedMethod · 0.45

Tested by

no test coverage detected