The framed-stream batch test with a stalled peer no longer times out when the runner stalls between frames #357

Merged
claude merged 1 commit from feature/355-framed-batch-stall into develop 2026-11-06 16:23:28 -05:00
Owner

FramedDnsStreamSessionBatchTests.ABatchQueuedBehindAStalledPeer_MissesTheDeadlineOnce_AndFreesEverySlot failed in pull-request run 1284 after 30 s.

Cause: the test, not the product.

  • FramedDnsStreamSession uses one idle timeout for the read-idle limit, the write deadline and the drain.
  • The test used 300 ms and sent its 16 queries in 16 separate writes. A runner stall of more than 300 ms between two writes ended the read loop as idle, drained and aborted the session, and the harness then waited out its 30 s safety timeout.
  • #12 is not involved: the test handler never asks to close, and ClosedAfterDrain is read only by the listeners.
  • Reproduced by putting a 600 ms stall after frame 7 in the old test: the same exception and stack as CI.

Fix (tests only):

  • The idle timeout is 1 s, and the 16 frames go in one write. The stalled-peer part of the test is on the write side and is unchanged.
  • ReceiveAsync fails at once when the session ends first.
  • ListenSocketSetTests binds port 0 and reads the port back. The two tests that need one shared known port use a bounded retry, with a comment.

Checked:

  • The class passed 30/30 runs (coder) and 15/15 (verifier) in the CI container on asgard, and 20/20 on Lofnheim.
  • Core.Tests 352/352. Verifier: pass.

Closes #355

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

`FramedDnsStreamSessionBatchTests.ABatchQueuedBehindAStalledPeer_MissesTheDeadlineOnce_AndFreesEverySlot` failed in pull-request run 1284 after 30 s. Cause: the test, not the product. - `FramedDnsStreamSession` uses one idle timeout for the read-idle limit, the write deadline and the drain. - The test used 300 ms and sent its 16 queries in 16 separate writes. A runner stall of more than 300 ms between two writes ended the read loop as idle, drained and aborted the session, and the harness then waited out its 30 s safety timeout. - #12 is not involved: the test handler never asks to close, and `ClosedAfterDrain` is read only by the listeners. - Reproduced by putting a 600 ms stall after frame 7 in the old test: the same exception and stack as CI. Fix (tests only): - The idle timeout is 1 s, and the 16 frames go in one write. The stalled-peer part of the test is on the write side and is unchanged. - `ReceiveAsync` fails at once when the session ends first. - `ListenSocketSetTests` binds port 0 and reads the port back. The two tests that need one shared known port use a bounded retry, with a comment. Checked: - The class passed 30/30 runs (coder) and 15/15 (verifier) in the CI container on asgard, and 20/20 on Lofnheim. - Core.Tests 352/352. Verifier: pass. Closes #355 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The framed-stream stalled-peer batch test no longer fails when a loaded runner stalls it past the idle timeout
Some checks failed
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m22s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -2m11s
Build / Stage Draft Release (push) Successful in -2m42s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -2m5s
Build / Build Binary (linux-arm64) (pull_request) Successful in -12s
Build / Pack and Push NuGet Packages (common) (push) Successful in -2m33s
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in -2m9s
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -1m57s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -1m52s
Build / Build Binary (linux-amd64) (pull_request) Successful in -39s
Build / Build Binary (macos-amd64) (pull_request) Successful in -29s
Build / Build Binary (macos-arm64) (pull_request) Successful in -1m6s
Build / Build Binary (linux-amd64) (push) Successful in -1m8s
Build / Build Binary (linux-arm64) (push) Successful in -1m15s
Build / Build Binary (windows-amd64) (push) Successful in -1m31s
Build / Build Binary (windows-amd64) (pull_request) Successful in -1m20s
Build / Smoke Test the Windows Binary (pull_request) Successful in 15s
Build / Build Binary (macos-arm64) (push) Successful in -1m40s
Build / Build Arch Linux Packages (pull_request) Successful in -2m25s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in -1m5s
Build / Build and Push Image (pull_request) Successful in -2m37s
Build / Publish Release (pull_request) Successful in -2m41s
Build / Pipeline (pull_request) Successful in 0s
Build / Pipeline (push) Has been cancelled
Build / Build Arch Linux Packages (push) Has been cancelled
Build / Build and Test Deb and RPM Packages (push) Has been cancelled
Build / Build and Push Image (push) Has been cancelled
Build / Smoke Test the Windows Binary (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Build Binary (macos-amd64) (push) Has been cancelled
8458e8e4d7
The test sets one 300 ms idle timeout that is also the read-idle limit and the write deadline, so a stall between two query frames ended the session before the handler saw all 16 queries and the test waited out its 30 s safety timeout. It now sends the frames in one write, uses a one second timeout, and fails at once with the reason when the session ends early. The listen socket set tests bind port 0 or retry on a taken port instead of reserving and releasing one.

Closes #355

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit bc56d8ccb5 into develop 2026-11-06 16:23:28 -05:00
Sign in to join this conversation.
No reviewers
No milestone
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!357
No description provided.