The transport tests cope with Windows port exclusion ranges and slow listener binds #379
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!379
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/375-windows-port-failures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The transport tests no longer fail on Windows when a port the system hands out for one protocol is reserved for the other, or when a listener binds slowly. Test code only; no product change.
Causes, each reproduced on lofnheim
PlainForwarderClientTests(run 1451) andStubZoneNsPullerTestswith WSAEACCES.DnsCryptListenerTestspicked its port with a TCP-only helper and waited a fixed 200 ms for the listeners to bind. Under CPU load the first tests ran before the UDP socket was bound ("forcibly closed", "actively refused"; run 1454).Fixes
LocalAddresses.GetFreePort(five identical copies) picks a random port in the dynamic range 49152-65535 (RFC 6335 §6) and binds TCP and UDP on it explicitly, so a refused pick costs one attempt; up to 2000 attempts.IsListening, or the listener task ending) instead of sleeping.Verified
GetFreePortis still reserve-and-release for the tests that need one number across protocols and addresses; its random picks overlap the Linux ephemeral range, a small window the verifier noted and did not measure.Closes #375
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK