diff --git a/test/common/quic/envoy_quic_client_session_test.cc b/test/common/quic/envoy_quic_client_session_test.cc index fcac829b33d8..bbdc14761453 100644 --- a/test/common/quic/envoy_quic_client_session_test.cc +++ b/test/common/quic/envoy_quic_client_session_test.cc @@ -99,7 +99,7 @@ class EnvoyQuicClientSessionTest : public testing::TestWithParam( quic::test::crypto_test_utils::ProofVerifierForTesting())), quic_stat_names_(store_.symbolTable()), @@ -159,17 +159,11 @@ class EnvoyQuicClientSessionTest : public testing::TestWithParamclose(); } - Network::ConnectionSocketPtr - createUnconnectedSocket(const Network::Address::InstanceConstSharedPtr& peer_addr, - Network::Address::InstanceConstSharedPtr& local_addr) { - auto connection_socket = std::make_unique( - Network::Socket::Type::Datagram, local_addr, peer_addr, - Network::SocketCreationOptions{false, 0}); - connection_socket->setDetectedTransportProtocol("quic"); - ASSERT(connection_socket->isOpen()); - connection_socket->bind(local_addr); - local_addr = connection_socket->connectionInfoProvider().localAddress(); - return connection_socket; + Network::UdpListenSocketPtr createListenSocket(Network::Address::InstanceConstSharedPtr& addr) { + auto socket = + std::make_unique(addr, /*options=*/nullptr, /*bind=*/true); + addr = socket->connectionInfoProvider().localAddress(); + return socket; } EnvoyQuicClientStream& sendGetRequest(Http::ResponseDecoder& response_decoder, @@ -199,7 +193,7 @@ class EnvoyQuicClientSessionTest : public testing::TestWithParam