diff --git a/test/integration/BUILD b/test/integration/BUILD index a1348059a050b..cc888242847f2 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -515,6 +515,7 @@ envoy_cc_test_library( "//test/integration/filters:random_pause_filter_lib", "//test/integration/filters:remove_response_headers_lib", "//test/test_common:logging_lib", + "//test/test_common:threadsafe_singleton_injector_lib", "//test/test_common:utility_lib", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", "@envoy_api//envoy/config/route/v3:pkg_cc_proto", diff --git a/test/integration/buffer_accounting_integration_test.cc b/test/integration/buffer_accounting_integration_test.cc index 13f68cc08a40f..d996dbdf601f4 100644 --- a/test/integration/buffer_accounting_integration_test.cc +++ b/test/integration/buffer_accounting_integration_test.cc @@ -213,8 +213,8 @@ TEST_P(Http2BufferWatermarksTest, ShouldTrackAllocatedBytesToUpstream) { buffer_factory_->setExpectedAccountBalance(request_body_size, num_requests); // Makes us have Envoy's writes to upstream return EAGAIN - writev_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setWriteReturnsEgain(); codec_client_ = makeHttpConnection(lookupPort("http")); @@ -228,7 +228,7 @@ TEST_P(Http2BufferWatermarksTest, ShouldTrackAllocatedBytesToUpstream) { << " buffer max: " << buffer_factory_->maxBufferSize() << printAccounts(); } - writev_matcher_->setResumeWrites(); + write_matcher_->setResumeWrites(); for (auto& response : responses) { ASSERT_TRUE(response->waitForEndStream()); @@ -246,12 +246,12 @@ TEST_P(Http2BufferWatermarksTest, ShouldTrackAllocatedBytesToDownstream) { initialize(); buffer_factory_->setExpectedAccountBalance(response_body_size, num_requests); - writev_matcher_->setSourcePort(lookupPort("http")); + write_matcher_->setSourcePort(lookupPort("http")); codec_client_ = makeHttpConnection(lookupPort("http")); // Simulate TCP push back on the Envoy's downstream network socket, so that outbound frames // start to accumulate in the transport socket buffer. - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); auto responses = sendRequests(num_requests, request_body_size, response_body_size); @@ -263,7 +263,7 @@ TEST_P(Http2BufferWatermarksTest, ShouldTrackAllocatedBytesToDownstream) { << " buffer max: " << buffer_factory_->maxBufferSize() << printAccounts(); } - writev_matcher_->setResumeWrites(); + write_matcher_->setResumeWrites(); // Wait for streams to terminate. for (auto& response : responses) { @@ -454,8 +454,8 @@ TEST_P(Http2OverloadManagerIntegrationTest, initialize(); // Makes us have Envoy's writes to upstream return EAGAIN - writev_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setWriteReturnsEgain(); codec_client_ = makeHttpConnection(lookupPort("http")); auto smallest_request_response = std::move(sendRequests(1, 4096, 4096)[0]); @@ -500,7 +500,7 @@ TEST_P(Http2OverloadManagerIntegrationTest, "overload.envoy.overload_actions.reset_high_memory_stream.scale_percent", 0); // Resume writes to upstream, any request streams that survive can go through. - writev_matcher_->setResumeWrites(); + write_matcher_->setResumeWrites(); if (!streamBufferAccounting()) { // If we're not doing the accounting, we didn't end up resetting these @@ -533,9 +533,9 @@ TEST_P(Http2OverloadManagerIntegrationTest, initialize(); // Makes us have Envoy's writes to downstream return EAGAIN - writev_matcher_->setSourcePort(lookupPort("http")); + write_matcher_->setSourcePort(lookupPort("http")); codec_client_ = makeHttpConnection(lookupPort("http")); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); auto smallest_response = std::move(sendRequests(1, 10, 4096)[0]); waitForNextUpstreamRequest(); @@ -589,7 +589,7 @@ TEST_P(Http2OverloadManagerIntegrationTest, "overload.envoy.overload_actions.reset_high_memory_stream.scale_percent", 0); // Resume writes to downstream, any responses that survive can go through. - writev_matcher_->setResumeWrites(); + write_matcher_->setResumeWrites(); if (streamBufferAccounting()) { EXPECT_TRUE(largest_response->waitForReset()); @@ -642,8 +642,8 @@ TEST_P(Http2OverloadManagerIntegrationTest, CanResetStreamIfEnvoyLevelStreamEnde codec_client_ = makeRawHttpConnection(makeClientConnection(lookupPort("http")), http2_options); // Makes us have Envoy's writes to downstream return EAGAIN - writev_matcher_->setSourcePort(lookupPort("http")); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setSourcePort(lookupPort("http")); + write_matcher_->setWriteReturnsEgain(); // Send a request auto encoder_decoder = codec_client_->startRequest(Http::TestRequestHeaderMapImpl{ @@ -690,7 +690,7 @@ TEST_P(Http2OverloadManagerIntegrationTest, CanResetStreamIfEnvoyLevelStreamEnde "overload.envoy.overload_actions.reset_high_memory_stream.scale_percent", 0); // Resume writes to downstream. - writev_matcher_->setResumeWrites(); + write_matcher_->setResumeWrites(); if (streamBufferAccounting()) { EXPECT_TRUE(response->waitForReset()); diff --git a/test/integration/filters/test_socket_interface.cc b/test/integration/filters/test_socket_interface.cc index 5991e7a948708..3356cecc87612 100644 --- a/test/integration/filters/test_socket_interface.cc +++ b/test/integration/filters/test_socket_interface.cc @@ -13,10 +13,22 @@ namespace Envoy { namespace Network { +Api::IoCallUint64Result TestIoSocketHandle::sendmsg(const Buffer::RawSlice* slices, + uint64_t num_slice, int flags, + const Address::Ip* self_ip, + const Address::Instance& peer_address) { + if (write_override_) { + auto result = write_override_(this, slices, num_slice); + if (result.has_value()) { + return std::move(result).value(); + } + } + return Test::IoSocketHandlePlatformImpl::sendmsg(slices, num_slice, flags, self_ip, peer_address); +} Api::IoCallUint64Result TestIoSocketHandle::writev(const Buffer::RawSlice* slices, uint64_t num_slice) { - if (writev_override_) { - auto result = writev_override_(this, slices, num_slice); + if (write_override_) { + auto result = write_override_(this, slices, num_slice); if (result.has_value()) { return std::move(result).value(); } @@ -30,8 +42,8 @@ IoHandlePtr TestIoSocketHandle::accept(struct sockaddr* addr, socklen_t* addrlen return nullptr; } - return std::make_unique(writev_override_, result.return_value_, - socket_v6only_, domain_); + return std::make_unique(write_override_, result.return_value_, socket_v6only_, + domain_); } IoHandlePtr TestIoSocketHandle::duplicate() { @@ -40,13 +52,13 @@ IoHandlePtr TestIoSocketHandle::duplicate() { throw EnvoyException(fmt::format("duplicate failed for '{}': ({}) {}", fd_, result.errno_, errorDetails(result.errno_))); } - return std::make_unique(writev_override_, result.return_value_, - socket_v6only_, domain_); + return std::make_unique(write_override_, result.return_value_, socket_v6only_, + domain_); } IoHandlePtr TestSocketInterface::makeSocket(int socket_fd, bool socket_v6only, absl::optional domain) const { - return std::make_unique(writev_override_proc_, socket_fd, socket_v6only, + return std::make_unique(write_override_proc_, socket_fd, socket_v6only, domain); } diff --git a/test/integration/filters/test_socket_interface.h b/test/integration/filters/test_socket_interface.h index 61da3e86fa105..abb48f77da9eb 100644 --- a/test/integration/filters/test_socket_interface.h +++ b/test/integration/filters/test_socket_interface.h @@ -21,15 +21,15 @@ namespace Network { class TestIoSocketHandle : public Test::IoSocketHandlePlatformImpl { public: - using WritevOverrideType = absl::optional(TestIoSocketHandle* io_handle, - const Buffer::RawSlice* slices, - uint64_t num_slice); - using WritevOverrideProc = std::function; + using WriteOverrideType = absl::optional(TestIoSocketHandle* io_handle, + const Buffer::RawSlice* slices, + uint64_t num_slice); + using WriteOverrideProc = std::function; - TestIoSocketHandle(WritevOverrideProc writev_override_proc, os_fd_t fd = INVALID_SOCKET, + TestIoSocketHandle(WriteOverrideProc write_override_proc, os_fd_t fd = INVALID_SOCKET, bool socket_v6only = false, absl::optional domain = absl::nullopt) : Test::IoSocketHandlePlatformImpl(fd, socket_v6only, domain), - writev_override_(writev_override_proc) {} + write_override_(write_override_proc) {} void initializeFileEvent(Event::Dispatcher& dispatcher, Event::FileReadyCb cb, Event::FileTriggerType trigger, uint32_t events) override { @@ -50,9 +50,13 @@ class TestIoSocketHandle : public Test::IoSocketHandlePlatformImpl { private: IoHandlePtr accept(struct sockaddr* addr, socklen_t* addrlen) override; Api::IoCallUint64Result writev(const Buffer::RawSlice* slices, uint64_t num_slice) override; + Api::IoCallUint64Result sendmsg(const Buffer::RawSlice* slices, uint64_t num_slice, int flags, + const Address::Ip* self_ip, + const Address::Instance& peer_address) override; + IoHandlePtr duplicate() override; - const WritevOverrideProc writev_override_; + const WriteOverrideProc write_override_; absl::Mutex mutex_; Event::Dispatcher* dispatcher_ ABSL_GUARDED_BY(mutex_) = nullptr; }; @@ -68,22 +72,22 @@ class TestIoSocketHandle : public Test::IoSocketHandlePlatformImpl { class TestSocketInterface : public SocketInterfaceImpl { public: /** - * Override the behavior of the IoSocketHandleImpl::writev() method. - * The supplied callback is invoked with the arguments of the writev method and the index + * Override the behavior of the IoSocketHandleImpl::writev() and + * IoSocketHandleImpl::sendmsg() methods. + * The supplied callback is invoked with the slices arguments of the write method and the index * of the accepted socket. * Returning absl::nullopt from the callback continues normal execution of the - * IoSocketHandleImpl::writev() method. Returning a Api::IoCallUint64Result from callback skips - * the IoSocketHandleImpl::writev() with the returned result value. + * write methods. Returning a Api::IoCallUint64Result from callback skips + * the write methods with the returned result value. */ - TestSocketInterface(TestIoSocketHandle::WritevOverrideProc writev) - : writev_override_proc_(writev) {} + TestSocketInterface(TestIoSocketHandle::WriteOverrideProc write) : write_override_proc_(write) {} private: // SocketInterfaceImpl IoHandlePtr makeSocket(int socket_fd, bool socket_v6only, absl::optional domain) const override; - const TestIoSocketHandle::WritevOverrideProc writev_override_proc_; + const TestIoSocketHandle::WriteOverrideProc write_override_proc_; }; } // namespace Network diff --git a/test/integration/http2_flood_integration_test.cc b/test/integration/http2_flood_integration_test.cc index 848ad5b9964f4..9950e49d58cf7 100644 --- a/test/integration/http2_flood_integration_test.cc +++ b/test/integration/http2_flood_integration_test.cc @@ -119,7 +119,7 @@ void Http2FloodMitigationTest::beginSession() { options->emplace_back(std::make_shared( envoy::config::core::v3::SocketOption::STATE_PREBIND, ENVOY_MAKE_SOCKET_OPTION_NAME(SOL_SOCKET, SO_RCVBUF), 1024)); - writev_matcher_->setSourcePort(lookupPort("http")); + write_matcher_->setSourcePort(lookupPort("http")); tcp_client_ = makeTcpConnection(lookupPort("http"), options); startHttp2Session(); } @@ -156,11 +156,11 @@ void Http2FloodMitigationTest::floodClient(const Http2Frame& frame, uint32_t num waitForNextUpstreamRequest(); // Make Envoy's writes into the upstream connection to return EAGAIN - writev_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); auto buf = serializeFrames(frame, num_frames); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); auto* upstream = fake_upstreams_.front().get(); ASSERT_TRUE(upstream->rawWriteConnection(0, std::string(buf.begin(), buf.end()))); @@ -184,7 +184,7 @@ void Http2FloodMitigationTest::floodServer(absl::string_view host, absl::string_ auto frame = readFrame(); EXPECT_EQ(Http2Frame::Type::Headers, frame.type()); EXPECT_EQ(expected_http_status, frame.responseStatus()); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); for (uint32_t frame = 0; frame < num_frames; ++frame) { request = Http2Frame::makeRequest(Http2Frame::makeClientStreamId(++request_idx), host, path); sendFrame(request); @@ -210,7 +210,7 @@ void Http2FloodMitigationTest::prefillOutboundDownstreamQueue(uint32_t data_fram // such the next response triggers flood protection. // Simulate TCP push back on the Envoy's downstream network socket, so that outbound frames // start to accumulate in the transport socket buffer. - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); const auto request = Http2Frame::makeRequest( Http2Frame::makeClientStreamId(0), "host", "/test/long/url", @@ -258,11 +258,11 @@ Http2FloodMitigationTest::prefillOutboundUpstreamQueue(uint32_t frame_count) { EXPECT_TRUE(upstream_request_->waitForData(*dispatcher_, 1)); // Make Envoy's writes into the upstream connection to return EAGAIN - writev_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); auto buf = serializeFrames(Http2Frame::makePingFrame(), frame_count); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); auto* upstream = fake_upstreams_.front().get(); EXPECT_TRUE(upstream->rawWriteConnection(0, std::string(buf.begin(), buf.end()))); // Wait for pre-fill data to arrive to Envoy @@ -284,7 +284,7 @@ void Http2FloodMitigationTest::triggerListenerDrain() { TEST_P(Http2FloodMitigationTest, Ping) { setNetworkConnectionBufferSize(); beginSession(); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); floodServer(Http2Frame::makePingFrame(), "http2.outbound_control_flood", ControlFrameFloodLimit + 1); } @@ -292,7 +292,7 @@ TEST_P(Http2FloodMitigationTest, Ping) { TEST_P(Http2FloodMitigationTest, Settings) { setNetworkConnectionBufferSize(); beginSession(); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); floodServer(Http2Frame::makeEmptySettingsFrame(), "http2.outbound_control_flood", ControlFrameFloodLimit + 1); } @@ -325,7 +325,7 @@ TEST_P(Http2FloodMitigationTest, Data) { // 1000 DATA frames should trigger flood protection. // Simulate TCP push back on the Envoy's downstream network socket, so that outbound frames start // to accumulate in the transport socket buffer. - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); const auto request = Http2Frame::makeRequest(1, "host", "/test/long/url", {Http2Frame::Header("response_data_blocks", "1000"), @@ -565,7 +565,7 @@ TEST_P(Http2FloodMitigationTest, Trailers) { // 999 DATA frames and trailers should trigger flood protection. // Simulate TCP push back on the Envoy's downstream network socket, so that outbound frames start // to accumulate in the transport socket buffer. - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); static_cast(fake_upstreams_.front().get()) ->setResponseTrailers(std::make_unique( @@ -608,7 +608,7 @@ TEST_P(Http2FloodMitigationTest, WindowUpdateOnLowWatermarkFlood) { autonomous_allow_incomplete_streams_ = true; beginSession(); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); // pre-fill two away from overflow const auto request = Http2Frame::makePostRequest( @@ -673,7 +673,7 @@ TEST_P(Http2FloodMitigationTest, RST_STREAM) { // Simulate TCP push back on the Envoy's downstream network socket, so that outbound frames start // to accumulate in the transport socket buffer. - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); for (++stream_index; stream_index < ControlFrameFloodLimit + 2; ++stream_index) { request = @@ -949,7 +949,7 @@ TEST_P(Http2FloodMitigationTest, TooManyStreams) { // writing by the upstream server. In this case Envoy will not see upstream responses and will // keep client streams open, eventually maxing them out and causing client connection to be // closed. - writev_matcher_->setSourcePort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setSourcePort(fake_upstreams_[0]->localAddress()->ip()->port()); // Exceed the number of streams allowed by the server. The server should stop reading from the // client. @@ -1446,9 +1446,9 @@ TEST_P(Http2FloodMitigationTest, RequestMetadata) { // Make Envoy's writes into the upstream connection to return EAGAIN, preventing proxying of the // METADATA frames - writev_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); + write_matcher_->setDestinationPort(fake_upstreams_[0]->localAddress()->ip()->port()); - writev_matcher_->setWritevReturnsEgain(); + write_matcher_->setWriteReturnsEgain(); // Send AllFrameFloodLimit + 1 number of METADATA frames from the downstream client to trigger the // outbound upstream flood when they are proxied. diff --git a/test/integration/protocol_integration_test.cc b/test/integration/protocol_integration_test.cc index a35ee6e29eb03..109e84dde5b66 100644 --- a/test/integration/protocol_integration_test.cc +++ b/test/integration/protocol_integration_test.cc @@ -39,6 +39,7 @@ #include "test/test_common/logging.h" #include "test/test_common/network_utility.h" #include "test/test_common/registry.h" +#include "test/test_common/threadsafe_singleton_injector.h" #include "absl/time/time.h" #include "gtest/gtest.h" @@ -3534,11 +3535,17 @@ TEST_P(DownstreamProtocolIntegrationTest, ContentLengthLargerThanPayload) { EXPECT_EQ(Http::StreamResetReason::RemoteReset, response->resetReason()); } +class NoUdpGso : public Api::OsSysCallsImpl { +public: + bool supportsUdpGso() const override { return false; } +}; + TEST_P(DownstreamProtocolIntegrationTest, HandleSocketFail) { + // Make sure for HTTP/3 Envoy will use sendmsg, so the write_matcher will work. + NoUdpGso reject_gso_; + TestThreadsafeSingletonInjector os_calls{&reject_gso_}; + ASSERT(!Api::OsSysCallsSingleton::get().supportsUdpGso()); SocketInterfaceSwap socket_swap; - if (downstreamProtocol() == Http::CodecType::HTTP3) { - return; - } initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); @@ -3547,12 +3554,23 @@ TEST_P(DownstreamProtocolIntegrationTest, HandleSocketFail) { // Makes us have Envoy's writes to downstream return EBADF Network::IoSocketError* ebadf = Network::IoSocketError::getIoSocketEbadfInstance(); - socket_swap.writev_matcher_->setSourcePort(lookupPort("http")); - socket_swap.writev_matcher_->setWritevOverride(ebadf); + socket_swap.write_matcher_->setSourcePort(lookupPort("http")); + socket_swap.write_matcher_->setWriteOverride(ebadf); + // TODO(danzh) set to true. upstream_request_->encodeHeaders(Http::TestResponseHeaderMapImpl{{":status", "200"}}, false); - ASSERT_TRUE(codec_client_->waitForDisconnect()); - socket_swap.writev_matcher_->setWritevOverride(nullptr); + if (downstreamProtocol() == Http::CodecType::HTTP3) { + // For HTTP/3 since the packets are black holed, there is no client side + // indication of connection close. Wait on Envoy stats instead. + test_server_->waitForCounterEq("http.config_test.downstream_rq_rx_reset", 1); + codec_client_->close(); + } else { + ASSERT_TRUE(codec_client_->waitForDisconnect()); + } + socket_swap.write_matcher_->setWriteOverride(nullptr); + // Shut down the server before os_calls goes out of scope to avoid syscalls + // during its removal. + test_server_.reset(); } } // namespace Envoy diff --git a/test/integration/socket_interface_swap.cc b/test/integration/socket_interface_swap.cc index 94d8abba9fbd1..f2b716127d48a 100644 --- a/test/integration/socket_interface_swap.cc +++ b/test/integration/socket_interface_swap.cc @@ -2,17 +2,18 @@ namespace Envoy { +void preserveIoError(Api::IoError*) {} + SocketInterfaceSwap::SocketInterfaceSwap() { Envoy::Network::SocketInterfaceSingleton::clear(); test_socket_interface_loader_ = std::make_unique( std::make_unique( - [writev_matcher = writev_matcher_](Envoy::Network::TestIoSocketHandle* io_handle, - const Buffer::RawSlice*, - uint64_t) -> absl::optional { - Network::IoSocketError* error_override = writev_matcher->returnOverride(io_handle); + [write_matcher = write_matcher_](Envoy::Network::TestIoSocketHandle* io_handle, + const Buffer::RawSlice*, + uint64_t) -> absl::optional { + Network::IoSocketError* error_override = write_matcher->returnOverride(io_handle); if (error_override) { - return Api::IoCallUint64Result( - 0, Api::IoErrorPtr(error_override, Network::IoSocketError::deleteIoError)); + return Api::IoCallUint64Result(0, Api::IoErrorPtr(error_override, preserveIoError)); } return absl::nullopt; })); diff --git a/test/integration/socket_interface_swap.h b/test/integration/socket_interface_swap.h index 820041a5d4eb0..676b8989453e7 100644 --- a/test/integration/socket_interface_swap.h +++ b/test/integration/socket_interface_swap.h @@ -12,12 +12,12 @@ namespace Envoy { class SocketInterfaceSwap { public: // Object of this class hold the state determining the IoHandle which - // should return EAGAIN from the `writev` call. + // should return the supplied return from the `writev` or `sendmsg` calls. struct IoHandleMatcher { Network::IoSocketError* returnOverride(Envoy::Network::TestIoSocketHandle* io_handle) { absl::MutexLock lock(&mutex_); if (error_ && (io_handle->localAddress()->ip()->port() == src_port_ || - io_handle->peerAddress()->ip()->port() == dst_port_)) { + (dst_port_ && io_handle->peerAddress()->ip()->port() == dst_port_))) { ASSERT(matched_iohandle_ == nullptr || matched_iohandle_ == io_handle, "Matched multiple io_handles, expected at most one to match."); matched_iohandle_ = io_handle; @@ -40,12 +40,12 @@ class SocketInterfaceSwap { dst_port_ = port; } - void setWritevReturnsEgain() { - setWritevOverride(Network::IoSocketError::getIoSocketEagainInstance()); + void setWriteReturnsEgain() { + setWriteOverride(Network::IoSocketError::getIoSocketEagainInstance()); } // The caller is responsible for memory management. - void setWritevOverride(Network::IoSocketError* error) { + void setWriteOverride(Network::IoSocketError* error) { absl::WriterMutexLock lock(&mutex_); ASSERT(src_port_ != 0 || dst_port_ != 0); error_ = error; @@ -70,7 +70,7 @@ class SocketInterfaceSwap { Envoy::Network::SocketInterface* const previous_socket_interface_{ Envoy::Network::SocketInterfaceSingleton::getExisting()}; - std::shared_ptr writev_matcher_{std::make_shared()}; + std::shared_ptr write_matcher_{std::make_shared()}; std::unique_ptr test_socket_interface_loader_; };