The framed stream session tests no longer fail when a slow machine misses a sub-second timing bound #405

Merged
claude merged 1 commit from feature/402-framed-session-test-bounds into develop 2026-11-12 23:21:48 -05:00
Owner

The framed stream session tests no longer fail when a slow machine misses a sub-second timing bound. Test code only; no defect was found in FramedDnsStreamSession.

  • APeerThatStopsReading_HitsTheWriteDeadline_AndFreesEverySlot: the idle timeout is 1 s, not 300 ms, so the read-idle limit cannot end the session while the frames arrive. The "Respond under 100 ms" stopwatch bound is replaced by a check that each Respond has completed when it returns, which shows without a clock that the responder only queues and never waits on the stalled peer.
  • AQueryThatNeverAnswers_DoesNotHoldTheConnectionPastTheDrainBound: the idle timeout is 1 s, not 300 ms, so a stall between receiving the frames and the client's shutdown does not let the session give up first.
  • TheTransferToken_IsCancelledAtItsLimit_AndByAnAbort: the fixed 500 ms delay is replaced by a wait for the limited token's cancellation, bounded by the 30-second safety timeout.
  • Left as they are: the 250 ms negative windows, the 2 s drain bound, the 200 ms idle test that expects the close and the 200 ms lingering close in the harness. A stall of a few hundred milliseconds cannot fail any of them.

Verified

  • Build 0 warnings, 0 errors; Ninlil.Dns.Server.Core.Tests 356 of 356; csharpier clean.
  • The failure could not be reproduced here (0 of 30 runs under load before the change, 0 of 10 after), so the fix rests on reading the code paths.
  • Verifier: accepted. It confirmed from the product code that each test is still ended by the deadline its name states and that none became weaker. It ran no mutation or red-then-green check.

Closes #402

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The framed stream session tests no longer fail when a slow machine misses a sub-second timing bound. Test code only; no defect was found in `FramedDnsStreamSession`. - **`APeerThatStopsReading_HitsTheWriteDeadline_AndFreesEverySlot`:** the idle timeout is 1 s, not 300 ms, so the read-idle limit cannot end the session while the frames arrive. The "Respond under 100 ms" stopwatch bound is replaced by a check that each `Respond` has completed when it returns, which shows without a clock that the responder only queues and never waits on the stalled peer. - **`AQueryThatNeverAnswers_DoesNotHoldTheConnectionPastTheDrainBound`:** the idle timeout is 1 s, not 300 ms, so a stall between receiving the frames and the client's shutdown does not let the session give up first. - **`TheTransferToken_IsCancelledAtItsLimit_AndByAnAbort`:** the fixed 500 ms delay is replaced by a wait for the limited token's cancellation, bounded by the 30-second safety timeout. - **Left as they are:** the 250 ms negative windows, the 2 s drain bound, the 200 ms idle test that expects the close and the 200 ms lingering close in the harness. A stall of a few hundred milliseconds cannot fail any of them. **Verified** - Build 0 warnings, 0 errors; `Ninlil.Dns.Server.Core.Tests` 356 of 356; csharpier clean. - The failure could not be reproduced here (0 of 30 runs under load before the change, 0 of 10 after), so the fix rests on reading the code paths. - Verifier: accepted. It confirmed from the product code that each test is still ended by the deadline its name states and that none became weaker. It ran no mutation or red-then-green check. Closes #402 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The framed stream session tests no longer fail when a slow machine misses a sub-second timing bound
All checks were successful
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m8s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -2m4s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -2m5s
Build / Stage Draft Release (push) Successful in -2m35s
Build / Pack and Push NuGet Packages (common) (push) Successful in -2m7s
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in -2m12s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -2m4s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -1m36s
Build / Build Binary (linux-amd64) (pull_request) Successful in -1m2s
Build / Build Binary (linux-arm64) (pull_request) Successful in -57s
Build / Build Binary (macos-amd64) (pull_request) Successful in -59s
Build / Build Binary (macos-arm64) (pull_request) Successful in -1m4s
Build / Build Binary (windows-amd64) (pull_request) Successful in -57s
Build / Smoke Test the Windows Binary (pull_request) Successful in 15s
Build / Build Binary (linux-amd64) (push) Successful in -1m14s
Build / Build Binary (linux-arm64) (push) Successful in -1m4s
Build / Build Binary (macos-amd64) (push) Successful in -1m16s
Build / Build Binary (macos-arm64) (push) Successful in -53s
Build / Build Binary (windows-amd64) (push) Successful in -1m14s
Build / Smoke Test the Windows Binary (push) Successful in 15s
Build / Build Arch Linux Packages (pull_request) Successful in -1m48s
Build / Build and Push Image (pull_request) Successful in -1m56s
Build / Build Arch Linux Packages (push) Successful in -2m22s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in -13s
Build / Build and Push Image (push) Successful in -2m7s
Build / Build and Test Deb and RPM Packages (push) Successful in -23s
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
6d1e34a266
Closes #402

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit 3f1c46570f into develop 2026-11-12 23:21:48 -05:00
claude deleted branch feature/402-framed-session-test-bounds 2026-11-12 23:21:48 -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!405
No description provided.