litellm/tests/unit/integration_support
yuneng-jiang 7a001b5870
test(integration): probe ports with SO_REUSEADDR so forked children cannot block binds (#55431)
The port allocator checks a port by binding a throwaway socket and closing it.
When another thread spawns a subprocess at that moment, the child inherits a copy
of the probe socket and keeps it until it execs. The copy has no SO_REUSEADDR, so
a server that binds the port inside that window gets EADDRINUSE, which is how owned
Redis and other harness servers occasionally fail to start while worker stacks
start concurrently.

On Linux a bound socket with SO_REUSEADDR does not stop another SO_REUSEADDR socket
from binding and listening, so the probe now sets it there. Every harness server
already binds with SO_REUSEADDR except the raw asgi listener and one occupying
socket in the harness lifecycle test. Both set it now, because the probe can hand
out ports that still have TIME_WAIT entries. macOS keeps the plain probe since BSD
rules make a reuse probe both blocking and too permissive there.
2026-12-01 06:13:10 +00:00
..
__init__.py test(integration): add read-replica routing harness to the CircleCI integration suite (#42692) 2026-09-24 00:25:03 -07:00
test_asgi.py test(integration): probe ports with SO_REUSEADDR so forked children cannot block binds (#55431) 2026-12-01 06:13:10 +00:00
test_budget.py test(integration): give chaos and timing tests a harness API and gate raw signals (#46031) 2026-10-12 05:27:33 -07:00
test_client.py test(integration): wait for every worker in Scenario.model (#47277) 2026-10-18 14:49:25 -07:00
test_database_relay.py test(integration): recognize cached statements in database relay barriers (#50651) 2026-11-09 06:58:46 -08:00
test_ordering.py perf(ci): use native timing splits with bounded integration concurrency (#45837) 2026-10-10 13:35:11 -07:00
test_ports.py test(integration): probe ports with SO_REUSEADDR so forked children cannot block binds (#55431) 2026-12-01 06:13:10 +00:00
test_process.py test(integration): update two spend tests left stale by the rust spend log writer (#53363) 2026-11-21 12:01:35 -08:00
test_routing.py test(integration): add read-replica routing harness to the CircleCI integration suite (#42692) 2026-09-24 00:25:03 -07:00
test_sdk_models.py test(integration): build OpenAI and Anthropic SDK models before tests start threads (#46797) 2026-10-15 18:28:32 -07:00
test_sharding.py test(integration): report uncollected shard files as collection errors instead of crashing xdist (#47075) 2026-10-17 14:00:48 -07:00
test_timing.py test(integration): give chaos and timing tests a harness API and gate raw signals (#46031) 2026-10-12 05:27:33 -07:00
test_translation.py fix(ci): isolate integration workers and repair test fixtures (#45863) 2026-10-11 01:56:02 -07:00
test_upstream.py test(mcp): cancel disconnected HTTP tool handlers (#49436) 2026-10-31 16:41:49 -07:00
test_vertex.py test(vertex): align scripted authentication with Rust routing (#53001) 2026-11-20 01:57:57 +00:00
test_wire.py test(integration): keep owned peers off ephemeral ports (#51019) 2026-11-10 21:19:57 +00:00
test_workers.py test(integration): cut CircleCI proxy boot time with concurrent worker stacks and single-worker test proxies (#46037) 2026-10-12 09:48:42 -07:00