Flaky CI tests wait for what they check instead of racing the clock, and the plain-DNS tests skip Windows' refused ports #353

Merged
claude merged 14 commits from feature/278-ci-flaky-tests into develop 2026-11-06 18:29:55 -05:00
Owner

Fixes the flaky tests that failed develop and pull-request pipelines on and off since 2026-11-05 (#278), and the Windows port-refusal bursts in the plain-DNS listener tests (#341). Every fix is in the tests, except one additive product property.

Test Cause Fix
ForwarderQueryResolverTests.Coalescing_... The gated upstream was held past the 2 s per-forwarder timeout on a loaded runner The test's timeout is longer than its wait bound
QuicZoneTransferClientTests The fake primary disposed its stream before the client's end of stream The fake reads to end of stream; longer handshake timeouts; a fake failure is reported on dispose
CloudDnsZoneSyncServiceTests A fixed sleep Waits on the completed-pass count
TokenBucketDnsRateLimiterTests.RefillsTokensOverTime 10 ms per token, shorter than a thread stall 0.5 q/s plus a bounded poll
AdminLoginRateLimitingTests A 200 ms window with a fixed sleep Wider windows plus a bounded poll
Console ClientAddressListComponent, ClientListComponent Relative times computed when the spec file loaded Computed when each test runs
DHCP UDP round trips Short receive timeouts; reserve-and-release ports New BoundPort on Dhcpv4UdpListener and Dhcpv6UdpListener (like TftpServer.BoundPort); tests bind port 0; 30 s receive bound
PlainListenAddressTests and the stream test host (#341) 500 ms windows and fixed binding delays on Linux; on Windows, separate TCP and UDP excluded port ranges refuse the TCP half of a free UDP port for seconds Bounded waits for the listeners; GetFreePort skips refused pairs; host starts retried
SecondaryForwarderZoneTransferTests Reserve-and-release with no retry Bounded restart on another port

Checked:

  • 0-warning build, csharpier.
  • Linux, CI container: Forwarding 258, RateLimiting 27, Identity 77, Dhcp.Server.Core 184, Dhcpv4 18, Dhcpv6 7, Plain 20, Authoritative 671. Console specs 27/27, lint clean.
  • Windows (Lofnheim), Plain.Tests: 100/100 runs (coder), plus 30/30 and 20/20 (verifier).
  • Two verifier rounds passed.

Not fixed here, filed instead:

  • #351: storage-switch target-check timeout.
  • #352: MongoDB replica-pause timing.
  • #350: the QUIC client's end-of-stream write against other primaries, a product gap the old fake exposed.

Closes #278
Closes #341
Refs #8

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

Fixes the flaky tests that failed develop and pull-request pipelines on and off since 2026-11-05 (#278), and the Windows port-refusal bursts in the plain-DNS listener tests (#341). Every fix is in the tests, except one additive product property. | Test | Cause | Fix | |---|---|---| | `ForwarderQueryResolverTests.Coalescing_...` | The gated upstream was held past the 2 s per-forwarder timeout on a loaded runner | The test's timeout is longer than its wait bound | | `QuicZoneTransferClientTests` | The fake primary disposed its stream before the client's end of stream | The fake reads to end of stream; longer handshake timeouts; a fake failure is reported on dispose | | `CloudDnsZoneSyncServiceTests` | A fixed sleep | Waits on the completed-pass count | | `TokenBucketDnsRateLimiterTests.RefillsTokensOverTime` | 10 ms per token, shorter than a thread stall | 0.5 q/s plus a bounded poll | | `AdminLoginRateLimitingTests` | A 200 ms window with a fixed sleep | Wider windows plus a bounded poll | | Console `ClientAddressListComponent`, `ClientListComponent` | Relative times computed when the spec file loaded | Computed when each test runs | | DHCP UDP round trips | Short receive timeouts; reserve-and-release ports | **New `BoundPort`** on `Dhcpv4UdpListener` and `Dhcpv6UdpListener` (like `TftpServer.BoundPort`); tests bind port 0; 30 s receive bound | | `PlainListenAddressTests` and the stream test host (#341) | 500 ms windows and fixed binding delays on Linux; on Windows, separate TCP and UDP excluded port ranges refuse the TCP half of a free UDP port for seconds | Bounded waits for the listeners; `GetFreePort` skips refused pairs; host starts retried | | `SecondaryForwarderZoneTransferTests` | Reserve-and-release with no retry | Bounded restart on another port | Checked: - 0-warning build, csharpier. - Linux, CI container: Forwarding 258, RateLimiting 27, Identity 77, Dhcp.Server.Core 184, Dhcpv4 18, Dhcpv6 7, Plain 20, Authoritative 671. Console specs 27/27, lint clean. - Windows (Lofnheim), Plain.Tests: 100/100 runs (coder), plus 30/30 and 20/20 (verifier). - Two verifier rounds passed. Not fixed here, filed instead: - #351: storage-switch target-check timeout. - #352: MongoDB replica-pause timing. - #350: the QUIC client's end-of-stream write against other primaries, a product gap the old fake exposed. Closes #278 Closes #341 Refs #8 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278
Refs #341
Refs #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278
Refs #341
Refs #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The coalescing test comment names the exact per-forwarder timeouts
Some checks failed
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -2m9s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -2m4s
Build / Test .NET (pull_request) Failing after 5m4s
Build / Build Binary (linux-amd64) (push) Successful in -35s
Build / Build Binary (linux-arm64) (push) Successful in -32s
Build / Build Binary (macos-amd64) (push) Successful in -32s
Build / Stage Draft Release (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (common) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Has been skipped
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Has been skipped
Build / Build Binary (linux-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-amd64) (pull_request) Has been skipped
Build / Build Binary (macos-arm64) (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (pull_request) Has been skipped
Build / Publish Release (pull_request) Has been skipped
Build / Pipeline (pull_request) Failing after 0s
Build / Build Binary (macos-arm64) (push) Successful in -1m20s
Build / Build Binary (linux-arm64) (pull_request) Has been skipped
Build / Build Arch Linux Packages (pull_request) Has been skipped
Build / Smoke Test the Windows Binary (pull_request) Has been skipped
Build / Build and Test Deb and RPM Packages (pull_request) Has been skipped
Build / Build and Push Image (pull_request) Has been skipped
Build / Build Binary (windows-amd64) (push) Successful in -1m17s
Build / Smoke Test the Windows Binary (push) Successful in 17s
Build / Build and Push Image (push) Successful in -2m11s
Build / Build Arch Linux Packages (push) Successful in -1m57s
Build / Build and Test Deb and RPM Packages (push) Successful in -22s
Build / Publish Release (push) Successful in -2m42s
Build / Pipeline (push) Successful in 0s
9baf05fb83
Refs #278

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Merge remote-tracking branch 'origin/develop' into feature/278-ci-flaky-tests
All checks were successful
Build / Build Binary (linux-arm64) (push) Successful in -10s
Build / Build Binary (macos-amd64) (push) Successful in -17s
Build / Build Binary (macos-arm64) (push) Successful in -54s
Build / Build Binary (windows-amd64) (push) Successful in -48s
Build / Build and Push Image (push) Successful in -2m37s
Build / Build Arch Linux Packages (push) Successful in -2m27s
Build / Compute Version (pull_request) Successful in -2m39s
Build / Smoke Test the Windows Binary (push) Successful in 1m2s
Build / Test Admin Console (pull_request) Successful in -1m8s
Build / Build and Test Deb and RPM Packages (push) Successful in 43s
Build / Lint and Script Tests (pull_request) Successful in -1m35s
Build / Publish Release (push) Successful in -2m40s
Build / Pipeline (push) Successful in 0s
Build / Test .NET (pull_request) Successful in 4m9s
Build / Stage Draft Release (pull_request) Successful in -2m42s
Build / Pack and Push NuGet Packages (common) (pull_request) Successful in -2m30s
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m11s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -2m6s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -1m57s
Build / Build Binary (linux-amd64) (pull_request) Successful in -14s
Build / Build Binary (linux-arm64) (pull_request) Successful in 4s
Build / Build Binary (macos-amd64) (pull_request) Successful in -17s
Build / Build Binary (macos-arm64) (pull_request) Successful in -55s
Build / Build Binary (windows-amd64) (pull_request) Successful in -56s
Build / Build and Push Image (pull_request) Successful in -2m36s
Build / Smoke Test the Windows Binary (pull_request) Successful in 16s
Build / Build Arch Linux Packages (pull_request) Successful in -2m5s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in -47s
Build / Publish Release (pull_request) Successful in -2m41s
Build / Pipeline (pull_request) Successful in 0s
62c7488023
claude merged commit 564336b1fb into develop 2026-11-06 18:29:55 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!353
No description provided.