Skip to content

Auto-port 5.0: DnsAddressResolverGroupTest: Use a mock DNS server instead of resolving netty.io over the network - #17576

Merged
normanmaurer merged 1 commit into
5.0from
auto-port-pr-17566-to-5.0
Sep 22, 2026
Merged

normanmaurer merged 1 commit into
5.0from
auto-port-pr-17566-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17566 to 5.0
Cherry-picked commit: e9694df


Motivation:

testSharedDNSCacheAcrossEventLoops resolved the real netty.io hostname
over the network to verify that DnsAddressResolverGroup shares its DNS
cache across EventLoops. netty.io is fronted by Cloudflare, and live
queries can return different edge IPs on different lookups, which made
the assertSame check flaky regardless of whether the cache was actually
shared.

Modification:

Use a TestDnsServer (as already done in DnsNameResolverTest) backed by
a RecordStore that always returns a single, fixed A record for
netty.io, and point the resolver's nameServerProvider at it. This makes
both resolutions deterministic so the assertion only depends on the
cache-sharing behavior under test.

Result:

testSharedDNSCacheAcrossEventLoops no longer depends on the live DNS
answer for netty.io and is no longer flaky due to external network
behavior.

…ng netty.io over the network (#17566)

Motivation:

testSharedDNSCacheAcrossEventLoops resolved the real netty.io hostname
over the network to verify that DnsAddressResolverGroup shares its DNS
cache across EventLoops. netty.io is fronted by Cloudflare, and live
queries can return different edge IPs on different lookups, which made
the assertSame check flaky regardless of whether the cache was actually
shared.

Modification:

Use a TestDnsServer (as already done in DnsNameResolverTest) backed by
a RecordStore that always returns a single, fixed A record for
netty.io, and point the resolver's nameServerProvider at it. This makes
both resolutions deterministic so the assertion only depends on the
cache-sharing behavior under test.

Result:

testSharedDNSCacheAcrossEventLoops no longer depends on the live DNS
answer for netty.io and is no longer flaky due to external network
behavior.

(cherry picked from commit e9694df)
@testlens-app

testlens-app Bot commented Sep 21, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 718bba7
▶️ Tests: 232281 executed
⚪️ Checks: 12/12 completed


Learn more about TestLens at testlens.app/docs.

@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 22, 2026
@normanmaurer
normanmaurer merged commit 5b13c47 into 5.0 Sep 22, 2026
13 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-17566-to-5.0 branch September 22, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants