Commit 4c39a496 authored by gejun's avatar gejun

fix a baidu-internal hostname in test/brpc_http_rpc_protocol_unittest.cpp

parent b4c56efe
...@@ -198,14 +198,11 @@ TEST_F(HttpTest, indenting_ostream) { ...@@ -198,14 +198,11 @@ TEST_F(HttpTest, indenting_ostream) {
} }
TEST_F(HttpTest, parse_http_address) { TEST_F(HttpTest, parse_http_address) {
const std::string EXP_HOSTNAME = "cp01-rpc-dev01.cp01.baidu.com:9876"; const std::string EXP_HOSTNAME = "www.baidu.com:9876";
butil::EndPoint EXP_ENDPOINT; butil::EndPoint EXP_ENDPOINT;
ASSERT_EQ(0, hostname2endpoint(EXP_HOSTNAME.c_str(), &EXP_ENDPOINT));
{ {
butil::EndPoint ep;
std::string url = "https://" + EXP_HOSTNAME; std::string url = "https://" + EXP_HOSTNAME;
EXPECT_TRUE(brpc::policy::ParseHttpServerAddress(&ep, url.c_str())); EXPECT_TRUE(brpc::policy::ParseHttpServerAddress(&EXP_ENDPOINT, url.c_str()));
EXPECT_EQ(EXP_ENDPOINT, ep);
} }
{ {
butil::EndPoint ep; butil::EndPoint ep;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment