From eb31ad0a41ca3ffed641a02ce3828883034a760e Mon Sep 17 00:00:00 2001 From: Yevgen Ostroukhov Date: Sun, 10 Nov 2024 16:43:38 -0800 Subject: [PATCH] fixup: test1 --- src/core/lib/event_engine/posix_engine/posix_endpoint.cc | 6 ++---- test/core/event_engine/posix/posix_endpoint_test.cc | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc index 442059c4a758b..175c88ed693d7 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc @@ -1257,16 +1257,14 @@ PosixEndpointImpl::PosixEndpointImpl(EventHandle* handle, std::shared_ptr engine, MemoryAllocator&& /*allocator*/, const PosixTcpOptions& options) - : sock_( - PosixSocketWrapper(handle->Poller()->GetSystemApi()->AdoptExternalFd( - handle->WrappedFd()))), - on_done_(on_done), + : on_done_(on_done), traced_buffers_(), handle_(handle), poller_(handle->Poller()), engine_(engine) { fd_ = handle_->Poller()->GetSystemApi()->AdoptExternalFd(handle_->WrappedFd()); + sock_ = PosixSocketWrapper(fd_); PosixSocketWrapper sock(fd_); CHECK(options.resource_quota != nullptr); auto peer_addr_string = sock.PeerAddressString(*get_system_api()); diff --git a/test/core/event_engine/posix/posix_endpoint_test.cc b/test/core/event_engine/posix/posix_endpoint_test.cc index 7a80daffa7c0e..fd33f372375c4 100644 --- a/test/core/event_engine/posix/posix_endpoint_test.cc +++ b/test/core/event_engine/posix/posix_endpoint_test.cc @@ -194,13 +194,12 @@ class Worker : public grpc_core::DualRefCounted { class PosixEndpointTest : public ::testing::TestWithParam { void SetUp() override { - PosixSystemApi system_api; oracle_ee_ = std::make_shared(); scheduler_ = std::make_unique( posix_ee_.get()); EXPECT_NE(scheduler_, nullptr); - poller_ = MakeDefaultPoller(&system_api, scheduler_.get()); + poller_ = MakeDefaultPoller(&system_api_, scheduler_.get()); posix_ee_ = PosixEventEngine::MakeTestOnlyPosixEventEngine(poller_); EXPECT_NE(posix_ee_, nullptr); scheduler_->ChangeCurrentEventEngine(posix_ee_.get()); @@ -231,6 +230,7 @@ class PosixEndpointTest : public ::testing::TestWithParam { std::unique_ptr scheduler_; std::shared_ptr posix_ee_; std::shared_ptr oracle_ee_; + PosixSystemApi system_api_; }; TEST_P(PosixEndpointTest, ConnectExchangeBidiDataTransferTest) {