Fix flaky EndToEndTest.ClientAddressSpoofedForSomePeriod as client connection self address does not equal TestLoopback(1) in IPv4 build. Tested by: blaze test //third_party/quic/core/http:end_to_end_test --test_sharding_strategy=disabled --test_filter=*EndToEndTest.ClientAddressSpoofedForSomePeriod*RFCv1_B2ON --modify_execution_info='TestRunner=+requires-net:ipv4,TestRunner=+requires-net:loopback' --runs_per_test=100 PiperOrigin-RevId: 424879114
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc index 12372ed..aa1ef09 100644 --- a/quic/core/http/end_to_end_test.cc +++ b/quic/core/http/end_to_end_test.cc
@@ -3246,7 +3246,8 @@ ASSERT_TRUE(QuicConnectionPeer::HasUnusedPeerIssuedConnectionId( GetClientConnection())); - QuicIpAddress real_host = TestLoopback(1); + QuicIpAddress real_host = + client_->client()->session()->connection()->self_address().host(); ASSERT_TRUE(client_->MigrateSocket(real_host)); SendSynchronousFooRequestAndCheckResponse(); EXPECT_EQ(