Files
floci/src/test
Hector Ventura 2d3a5c045a test: bind the listeners of shared-ports-lock classes to loopback (#9747)
On macOS a listener bound to the wildcard address does not stop another
socket binding 127.0.0.1 on the same port, and a localhost dial then
reaches that socket, so the test's accept() waits for good. Classes on
the ports lock in READ mode run beside each other in the plain pass, and
two laptop passes hung this way in S3CopySimulatorTest. Linux refuses the
second bind, so CI was not affected.

The READ classes with such a listener, and FakeRespServer, which two more
use, now bind the loopback address: a ServerSocket, a JDK HttpServer or a
Vert.x server alike. ParallelLocksInventoryTest fails on a READ class, or
a helper it names, that opens a port-0 listener with no address, and
AGENTS.md states the rule.

RuntimeInitializationTest and RuntimeApiServerTest release a port and
start RuntimeApiServer on it, which binds every interface, so they take
the exclusive ports lock instead. The tests that dialed a listener on the
literal 127.0.0.1 now dial its bound address.

Signed-off-by: Hector Ventura <hectorvent@gmail.com>
2026-11-29 10:49:14 -04:00
..