diff --git a/test/common/network/configurator_test.cc b/test/common/network/configurator_test.cc index e1fe004269..9703632ed2 100644 --- a/test/common/network/configurator_test.cc +++ b/test/common/network/configurator_test.cc @@ -70,6 +70,7 @@ TEST_F(ConfiguratorTest, WhenDrainPostDnsRefreshEnabledDrainsPostDnsRefresh) { Invoke([&](Extensions::Common::DynamicForwardProxy::DnsCache::IterateHostMapCb callback) { callback("cached.example.com", host_info); callback("cached2.example.com", host_info); + callback("cached3.example.com", host_info); })); EXPECT_CALL(*dns_cache_, forceRefreshHosts()); @@ -85,6 +86,10 @@ TEST_F(ConfiguratorTest, WhenDrainPostDnsRefreshEnabledDrainsPostDnsRefresh) { "not-cached.example.com", std::make_shared(), Network::DnsResolver::ResolutionStatus::Success); + configurator_->onDnsResolutionComplete( + "not-cached2.example.com", + std::make_shared(), + Network::DnsResolver::ResolutionStatus::Success); } TEST_F(ConfiguratorTest, WhenDrainPostDnsNotEnabledDoesntDrainPostDnsRefresh) {