Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Wang <[email protected]>
  • Loading branch information
GehaFearless and empiredan authored Feb 8, 2024
1 parent 449ef32 commit 3e3d804
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/test/host_port_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ TEST(host_port_test, dns_resolver)
{
{
host_port hp("localhost", 8080);
auto addr = dns_resolver::instance().resolve_address(hp);
const auto &addr = dns_resolver::instance().resolve_address(hp);
ASSERT_TRUE(rpc_address("127.0.0.1", 8080) == addr ||
rpc_address("127.0.1.1", 8080) == addr);
}
Expand All @@ -247,8 +247,8 @@ TEST(host_port_test, dns_resolver)
host_port hp2("localhost", 8081);
g_hp->set_leader(hp2);

auto addr_grp = dns_resolver::instance().resolve_address(hp_grp);
auto g_addr = addr_grp.group_address();
const auto &addr_grp = dns_resolver::instance().resolve_address(hp_grp);
const auto * const g_addr = addr_grp.group_address();

ASSERT_EQ(g_addr->is_update_leader_automatically(), g_hp->is_update_leader_automatically());
ASSERT_STREQ(g_addr->name(), g_hp->name());
Expand Down

0 comments on commit 3e3d804

Please sign in to comment.