The DNS-over-TLS listener tests no longer fail when a loaded machine delays a client past a sub-second timeout #401

Merged
claude merged 1 commit from feature/396-dot-listener-tests into develop 2026-11-12 23:19:47 -05:00
Owner

The DNS-over-TLS listener tests no longer fail when a loaded machine delays a client past a sub-second timeout. Test code only.

  • Failure: two tests of DnsOverTlsListenerTests failed once each in CI under load, with "The connection closed before the expected bytes arrived" and "Broken pipe", each under one second into the test.
  • Cause: not a listener defect. The class ran its listeners with a 400 ms IdleTimeout, which is also the TLS handshake deadline (min(idle, 10 s)) and the read-idle limit, although no test in the class is about the timeout. A handshake or first write later than 400 ms is closed by design. The malformed-message path does not close the connection (it is logged and the session keeps reading).
  • Fix: the three listener setups in the class share one 10-second IdleTimeout. DnsOverTlsSessionTests keeps 400 ms, because the timeout is its subject and its client steps already retry.

Verified

  • Ninlil.Dns.Protocol.DnsOverTls.Tests 48 of 48; build 0 warnings; csharpier clean. No test in the class got slower (3 to 107 ms each).
  • The failure could not be reproduced here (0 of 30 runs under load before the change), so the fix rests on the code path, which the verifier confirmed fits both CI errors. Which of the two 400 ms deadlines fired in CI is not known.
  • Verifier: accepted. It found one more timing-sensitive test of a different kind, in FramedDnsStreamSessionTests, filed separately.

Closes #396

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The DNS-over-TLS listener tests no longer fail when a loaded machine delays a client past a sub-second timeout. Test code only. - **Failure:** two tests of `DnsOverTlsListenerTests` failed once each in CI under load, with "The connection closed before the expected bytes arrived" and "Broken pipe", each under one second into the test. - **Cause:** not a listener defect. The class ran its listeners with a 400 ms `IdleTimeout`, which is also the TLS handshake deadline (`min(idle, 10 s)`) and the read-idle limit, although no test in the class is about the timeout. A handshake or first write later than 400 ms is closed by design. The malformed-message path does not close the connection (it is logged and the session keeps reading). - **Fix:** the three listener setups in the class share one 10-second `IdleTimeout`. `DnsOverTlsSessionTests` keeps 400 ms, because the timeout is its subject and its client steps already retry. **Verified** - `Ninlil.Dns.Protocol.DnsOverTls.Tests` 48 of 48; build 0 warnings; csharpier clean. No test in the class got slower (3 to 107 ms each). - The failure could not be reproduced here (0 of 30 runs under load before the change), so the fix rests on the code path, which the verifier confirmed fits both CI errors. Which of the two 400 ms deadlines fired in CI is not known. - Verifier: accepted. It found one more timing-sensitive test of a different kind, in `FramedDnsStreamSessionTests`, filed separately. Closes #396 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The DNS-over-TLS listener tests no longer fail when a loaded machine delays a client past a sub-second idle timeout
All checks were successful
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m10s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -2m5s
Build / Stage Draft Release (push) Successful in -2m36s
Build / Pack and Push NuGet Packages (common) (push) Successful in -2m24s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -2m3s
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in -2m8s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -2m4s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -2m5s
Build / Build Binary (linux-amd64) (pull_request) Successful in -1m10s
Build / Build Binary (linux-arm64) (pull_request) Successful in -1m5s
Build / Build Binary (macos-amd64) (pull_request) Successful in -1m18s
Build / Build Binary (macos-arm64) (pull_request) Successful in -1m11s
Build / Build Binary (windows-amd64) (pull_request) Successful in -1m8s
Build / Smoke Test the Windows Binary (pull_request) Successful in 15s
Build / Build Binary (linux-amd64) (push) Successful in -16s
Build / Build Binary (linux-arm64) (push) Successful in 0s
Build / Build Binary (macos-amd64) (push) Successful in -10s
Build / Build Binary (macos-arm64) (push) Successful in 1s
Build / Build Binary (windows-amd64) (push) Successful in -20s
Build / Smoke Test the Windows Binary (push) Successful in 15s
Build / Build Arch Linux Packages (pull_request) Successful in -2m18s
Build / Build and Push Image (pull_request) Successful in -2m22s
Build / Build Arch Linux Packages (push) Successful in -1m46s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 12s
Build / Build and Push Image (push) Successful in -2m32s
Build / Build and Test Deb and RPM Packages (push) Successful in 31s
Build / Publish Release (pull_request) Successful in -2m35s
Build / Pipeline (pull_request) Successful in 0s
Build / Publish Release (push) Successful in -2m35s
Build / Pipeline (push) Successful in 0s
cf441d2546
Closes #396

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit f8d52ff886 into develop 2026-11-12 23:19:47 -05:00
claude deleted branch feature/396-dot-listener-tests 2026-11-12 23:19:47 -05:00
Sign in to join this conversation.
No reviewers
No project
No assignees
1 participant
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!401
No description provided.