Fix flakiness in EventEngineClientTest.ConnectToNonExistentListenerTest (#30874)

pull/30839/head
Vignesh Babu 2 years ago committed by GitHub
parent b463cabeec
commit 3c720b092e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/core/event_engine/test_suite/client_test.cc

@ -85,6 +85,8 @@ TEST_F(EventEngineClientTest, ConnectToNonExistentListenerTest) {
auto test_ee = this->NewEventEngine();
Promise<std::unique_ptr<EventEngine::Endpoint>> client_endpoint_promise;
auto memory_quota = absl::make_unique<grpc_core::MemoryQuota>("bar");
std::string target_addr = absl::StrCat(
"ipv6:[::1]:", std::to_string(grpc_pick_unused_port_or_die()));
// Create a test EventEngine client endpoint and connect to a non existent
// listener.
ChannelArgsEndpointConfig config;
@ -95,7 +97,7 @@ TEST_F(EventEngineClientTest, ConnectToNonExistentListenerTest) {
EXPECT_FALSE(status.ok());
client_endpoint_promise.Set(nullptr);
},
URIToResolvedAddress("ipv6:[::1]:7000"), config,
URIToResolvedAddress(target_addr), config,
memory_quota->CreateMemoryAllocator("conn-1"), 24h);
auto client_endpoint = std::move(client_endpoint_promise.Get());

Loading…
Cancel
Save