diff --git a/test/integration/listener_lds_integration_test.cc b/test/integration/listener_lds_integration_test.cc index 8616adba8f7f9..6b9a2fc024bab 100644 --- a/test/integration/listener_lds_integration_test.cc +++ b/test/integration/listener_lds_integration_test.cc @@ -510,8 +510,7 @@ class RebalancerTest : public testing::TestWithParammutable_exact_balance(); - // 127.0.0.2 is defined in FakeOriginalDstListenerFilter. This virtual listener does not - // listen on a passive socket so it's safe to use any ip address. + // TODO(lambdai): Replace by getLoopbackAddressUrlString to emulate the real world. *virtual_listener_config.mutable_address()->mutable_socket_address()->mutable_address() = "127.0.0.2"; virtual_listener_config.mutable_address()->mutable_socket_address()->set_port_value(80); @@ -539,7 +538,11 @@ struct PerConnection { // Verify the connections are distributed evenly on the 2 worker threads of the redirected // listener. -TEST_P(RebalancerTest, RedirectConnectionIsBalancedOnDestinationListener) { +// Currently flaky because the virtual listener create listen socket anyway despite the socket is +// never used. Will enable this test once https://github.com/envoyproxy/envoy/pull/16259 is merged. +TEST_P(RebalancerTest, DISABLED_RedirectConnectionIsBalancedOnDestinationListener) { + auto ip_address_str = + Network::Test::getLoopbackAddressUrlString(TestEnvironment::getIpVersionsForTest().front()); concurrency_ = 2; int repeats = 10; initialize(); @@ -561,14 +564,14 @@ TEST_P(RebalancerTest, RedirectConnectionIsBalancedOnDestinationListener) { } } - ASSERT_EQ(TestUtility::findCounter(test_server_->statStore(), - "listener.127.0.0.2_80.worker_0.downstream_cx_total") - + ASSERT_EQ(TestUtility::findCounter( + test_server_->statStore(), + absl::StrCat("listener.", ip_address_str, "_80.worker_0.downstream_cx_total")) ->value(), repeats); - ASSERT_EQ(TestUtility::findCounter(test_server_->statStore(), - "listener.127.0.0.2_80.worker_1.downstream_cx_total") - + ASSERT_EQ(TestUtility::findCounter( + test_server_->statStore(), + absl::StrCat("listener.", ip_address_str, "_80.worker_1.downstream_cx_total")) ->value(), repeats); }