Skip to content

Commit

Permalink
[EventEngine] Skip dns_resolver_cooldown_test for `event_engine_dns…
Browse files Browse the repository at this point in the history
…` experiment (grpc#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 grpc#35251

COPYBARA_INTEGRATE_REVIEW=grpc#35251 from yijiem:fix-dns-resolver-cooldown-test 8578352
PiperOrigin-RevId: 589159895
  • Loading branch information
yijiem authored and copybara-github committed Dec 8, 2023
1 parent f0d7df7 commit 86d90f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/lib/event_engine/posix_engine/posix_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/lib/event_engine/posix_engine/posix_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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>(
Expand Down

0 comments on commit 86d90f5

Please sign in to comment.