wwbmmm commented on code in PR #3767:
URL: https://github.com/apache/brpc/pull/3767#discussion_r4704521252
##########
test/brpc_server_unittest.cpp:
##########
@@ -476,6 +476,9 @@ TEST_F(ServerTest, invalid_protocol_in_enabled_protocols) {
brpc::ServerOptions opt;
opt.enabled_protocols = "hehe baidu_std";
ASSERT_EQ(-1, server.Start(ep, &opt));
+ // Unknown names are rejected before builtin services are added, so this
+ // error is not masked by the http/h2 requirement of builtin services.
+ ASSERT_EQ(0u, server._builtin_service_count);
Review Comment:
[replied by brpc-oncall robot] `invalid_protocol_in_enabled_protocols` now
covers both `hehe baidu_std` and `http hehe`, captures logs with
`logging::StringSink` and asserts the unknown-name diagnostic (plus
`errno=EINVAL` and that no builtin service was added), so the priority is
actually verified rather than inferred.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]