Resolve test DNS in-process, drop external tag - #2354
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
The scheduled Build Check has been red since 2026-08-04 while the PR build stayed green. The two
AddressResolverGroupTestmethods that need a real DNS query were taggedexternaland reached www.google.com, so only the nightly ran them. Since 2216 the client auto-selects epoll or kqueue when the native library is present, and the test still built itsDnsAddressResolverGrouponNioDatagramChannel. Netty refuses to register that channel on a native loop, and every real lookup failed withincompatible event loop type. The PR build never executed that path, which is how it shipped in 3.0.12 hrough 3.0.14.Modification:
Add
StubDnsServer, an in-process Netty UDP responder that answers A queries with 127.0.0.1 andnonexistent.invalidwith NXDOMAIN. Point the resolver tests at it and derive the datagram channel from the transport the client actually selects.Assert the NXDOMAIN response code on the unknown-host test instead of any non-null cause. Remove the
externaltag, theexcludedGroupsproperty and profile, and the-Dexternal.testsflag from Build Check; the proxy Testcontainers classes have used a local nginx since #2299 and only need Docker. Give Build Checkworkflow_dispatchand the same test commands as the PR workflow. Document onsetAddressResolverGroupthat the datagram channel must match the transport.Result:
No test reaches the public internet. The resolver tests issue genuine DNS queries on every OS in every PR build, and a transport mismatch now fails three of them in the default suite instead of passing silently.