Every test project binds its servers on port 0 and reads the bound port instead of reserving and releasing one #362
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#362
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
BoundPortonListenSocketSet,UdpDnsListenerandTcpDnsListener)Why
AGENTS.md ("Test") asks every test project to start its server on port 0 and read the port it bound, instead of reserving a free port, releasing it and binding again. Another process can take the port in between. The rule says to convert a project when a change touches it, so projects nobody touched still use the old pattern.
Epic #8 part 2 converts
Ninlil.Dns.Protocol.Plain.TestsandNinlil.Dns.Server.Core.Tests. Their remaining calls are justified in comments, because several sockets share one port number.Ninlil.Dhcp.Server.Tftp.TestsusesTftpServer.BoundPort.Remaining call sites of
GetFreePort/GetFreeUdpPort/GetFreeTcpPort, with call counts, atd1a83213:Ninlil.Dhcp.Protocol.Dhcpv4.Tests: Dhcpv4ListenerResilienceTests (2), Dhcpv4LiveServiceControlTests (2), Dhcpv4UdpRoundTripTests (4)Ninlil.Dhcp.Protocol.Dhcpv6.Tests: Dhcpv6ListenerResilienceTests (2), Dhcpv6LiveServiceControlTests (2), Dhcpv6UdpRoundTripTests (2)Ninlil.Dhcp.Server.Relay.Tests: Dhcpv4RelayAgentTests (15), Dhcpv4RelayRoundTripTests (3), Dhcpv6RelayAgentTests (2), Dhcpv6RelayRoundTripTests (3)Ninlil.Dns.Protocol.DnsCrypt.Tests: DnsCryptDiscoveryLimitTests, DnsCryptExpiredCertificateTests, DnsCryptListenAddressTests, DnsCryptListenerTestFixture, DnsCryptProviderNameTests (1 each)Ninlil.Dns.Protocol.DnsOverHttps.Tests: DnsOverHttpsCacheControlTests (1), DnsOverHttpsDropTests (1), DnsOverHttpsHostedServiceTests (2), DnsOverHttpsRequestBytesTests (1)Ninlil.Dns.Protocol.DnsOverQuic.Tests: DnsOverQuicListenerTests (1)Ninlil.Dns.Protocol.DnsOverTls.Tests: DnsOverTlsListenerTests (1)Ninlil.Dns.Server.Authoritative.Tests: Forwarding/SecondaryForwarderZoneTransferTests (1)Ninlil.Dns.Server.Forwarding.ClientProtocols.Tests: PlainForwarderClientTests (1)Ninlil.Web.Tests: DhcpServiceControlControllerTests (1), StartupRefusalProcessTests (3), TransportSettingsHotReloadTests (1). The environment-variable ports inNinlilDnsWebApplicationFactorystay, as AGENTS.md says.What changes
BoundPortlike the one in part 2, for example on the DHCPv4/v6 listeners, the relay agents, DNSCrypt, DoH, DoQ and DoT.AddressInUse, as AGENTS.md describes.Acceptance
Ghost referenced this issue2026-11-06 20:06:00 -05:00