The framed stream session tests do not fail on a slow machine because of a 100 ms bound #402

Closed
opened 2026-11-12 21:03:13 -05:00 by claude · 0 comments
Owner

Found while verifying #396; not seen failing yet.

FramedDnsStreamSessionTests.APeerThatStopsReading_HitsTheWriteDeadline_AndFreesEverySlot (src/dotnet/tests/Ninlil.Dns.Server.Core.Tests/Transport/FramedDnsStreamSessionTests.cs, lines 89-108) runs with a 300 ms write deadline and asserts that each query.Respond returns in under 100 ms (line 108). The close itself is expected, but on a runner whose thread pool is starved the 100 ms assertion can fail without anything being wrong in the session.

Also check

  • The same file's tests around lines 356 and 682 (200 ms timeouts): one is an idle-close test; say for each whether a lost race can fail it.

Fix

  • Assert what the test is about (Respond does not block on the stalled peer) without a wall-clock bound that a loaded machine can miss: for example a generous bound far below the write deadline's effect, or a completion check that does not time the call.

Done when

  • No assertion in FramedDnsStreamSessionTests fails only because the machine is slow.
Found while verifying #396; not seen failing yet. `FramedDnsStreamSessionTests.APeerThatStopsReading_HitsTheWriteDeadline_AndFreesEverySlot` (`src/dotnet/tests/Ninlil.Dns.Server.Core.Tests/Transport/FramedDnsStreamSessionTests.cs`, lines 89-108) runs with a 300 ms write deadline and asserts that each `query.Respond` returns in under 100 ms (line 108). The close itself is expected, but on a runner whose thread pool is starved the 100 ms assertion can fail without anything being wrong in the session. **Also check** - The same file's tests around lines 356 and 682 (200 ms timeouts): one is an idle-close test; say for each whether a lost race can fail it. **Fix** - Assert what the test is about (`Respond` does not block on the stalled peer) without a wall-clock bound that a loaded machine can miss: for example a generous bound far below the write deadline's effect, or a completion check that does not time the call. **Done when** - No assertion in `FramedDnsStreamSessionTests` fails only because the machine is slow.
Sign in to join this conversation.
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#402
No description provided.