You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: remove TLS handshake-limit counter race from ConnectionAdmissionTests #229
PR #227 的 PR Quick(run 31996872168)在 Unit Tests 中失败:
TlsHandshakeLimitRejectsTheSecondConnectionWhileTheFirstStalls
Expected to be 1
but found 2
at Assert.That(server.ConnectionAdmission.ActiveConnections).IsEqualTo(1)
ConnectionAdmissionTests.cs:520
awaitYieldUntilAsync(()=>server.ConnectionAdmission.ActiveConnections==1,"rejected TLS connection must release its connection slot after terminal cleanup");awaitAssert.That(server.ConnectionAdmission.ActiveHandshakes).IsEqualTo(1);
awaitYieldUntilAsync(()=>server.ConnectionAdmission.ActiveConnections==1,"rejected TLS connection must release its connection slot after terminal cleanup");
Activity
SunSi12138 commentedon Aug 17, 2026
已通过 PR #234 修复并合并(merge commit
51b8157c,head2d31d9a)。根因
客户端
ReadUntilClosedAsync观察到 socket 关闭,不等于服务端 terminal cleanup + connection lease release 已经完成(#162 / PR #209 的设计要求 release after terminal cleanup)。因此ActiveConnections在该同步点之后仍可能合法地短暂为 2,即时断言IsEqualTo(1)断言的是瞬态。修复
ConnectionAdmissionTests.TlsHandshakeLimitRejectsTheSecondConnectionWhileTheFirstStalls将即时断言改为收敛等待:保留了
ReadUntilClosedAsync(second)验证"超 handshake limit 的连接被立即关闭",未引入固定Task.Delay。可选的 test seam 未加:ConnectionSlotStaysHeldUntilTerminalCleanupCompletes已通过 dispose gate 确定性覆盖 release-after-terminal-cleanup 语义。验证证据
25f7cc4,macOS arm64,Release):单测循环 150 次,114 次失败,失败内容与 PR [Runtime Architecture][Phase 17] Freeze Generated ABI as API 5 with startup fail-fast for old artifacts #227 CI(run31996872168)完全一致。ProtocolHandshakeTimeoutReleasesBothSlots,与本次改动无关,已另开 test: ProtocolHandshakeTimeoutReleasesBothSlots polling budget outruns its own 200ms timeout on fast machines #236 跟踪)。Closes #229。
SunSi12138 commentedon Aug 17, 2026
Fixed by #234 (merged as 51b8157).