[EventEngine] Skip `dns_resolver_cooldown_test` for `event_engine_dns` experiment (#35251)

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35251

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35251 from yijiem:fix-dns-resolver-cooldown-test 857835200a
PiperOrigin-RevId: 589159895
pull/34861/head^2
Yijie Ma 1 year ago committed by Copybara-Service
parent f0d7df79da
commit 86d90f54b0
  1. 2
      src/core/lib/event_engine/posix_engine/posix_engine.cc
  2. 2
      src/core/lib/event_engine/posix_engine/posix_engine.h
  3. 9
      test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc

@ -552,7 +552,7 @@ void PosixEventEngine::PosixDNSResolver::LookupTXT(LookupTXTCallback on_resolve,
absl::StatusOr<std::unique_ptr<EventEngine::DNSResolver>>
PosixEventEngine::GetDNSResolver(
const EventEngine::DNSResolver::ResolverOptions& options) {
GRPC_UNUSED const EventEngine::DNSResolver::ResolverOptions& options) {
#ifndef GRPC_POSIX_SOCKET_RESOLVE_ADDRESS
grpc_core::Crash("Unable to get DNS resolver for this platform.");
#else // GRPC_POSIX_SOCKET_RESOLVE_ADDRESS

@ -198,7 +198,7 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport,
bool CancelConnect(ConnectionHandle handle) override;
bool IsWorkerThread() override;
absl::StatusOr<std::unique_ptr<DNSResolver>> GetDNSResolver(
const DNSResolver::ResolverOptions& options) override;
GRPC_UNUSED const DNSResolver::ResolverOptions& options) override;
void Run(Closure* closure) override;
void Run(absl::AnyInvocable<void()> closure) override;
// Caution!! The timer implementation cannot create any fds. See #20418.

@ -42,6 +42,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/event_engine/default_event_engine.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/no_destruct.h"
#include "src/core/lib/gprpp/notification.h"
@ -409,6 +410,14 @@ static void test_cooldown() {
}
TEST(DnsResolverCooldownTest, MainTest) {
// TODO(yijiem): This test tests the cooldown behavior of the PollingResolver
// interface. To do that, it overrides the grpc_dns_lookup_hostname_ares
// function and overrides the iomgr's g_dns_resolver system. We would need to
// rewrite this test for EventEngine using a custom EE DNSResolver or adding
// to the resolver_fuzzer.
if (grpc_core::IsEventEngineDnsEnabled()) {
GTEST_SKIP() << "Not with event engine dns";
}
grpc_init();
auto work_serializer = std::make_shared<grpc_core::WorkSerializer>(

Loading…
Cancel
Save