litellm/tests/integration/compatibility
yuneng-jiang b602209ca6
test(integration): hand every harness server a port from one per-worker block (#46761)
* test(integration): hand every harness server a port from one per-worker block

About 45 places in the integration harness picked a port by binding port 0,
reading the number back, closing the socket and starting a server on that
number later. Another process could take the port in between, which surfaced
as "Address already in use" flakes. Earlier fixes retried around the race in
single call sites without removing it.

tests/integration/_support/ports.py now owns every port the harness picks
ahead of a server. Each pytest process claims a 200-port block between 10000
and 32767 by taking an exclusive flock on a per-block lock file in the system
temp directory, so parallel runs on one machine never share a block and the
lock goes away with the process. The range is above the fixed service ports
and below the Linux and macOS ephemeral ranges. Ports go out in order, are
never reused in a run, skip anything an outside process already holds, and
a process that exhausts its block claims the next free one.

The three _free_port copies, worker_endpoints' port-0 binds,
free_loopback_port, the owned proxy's lost-port-race retry and the owned
Redis retry loop are gone. Tests that restart a server on the same port now
allocate that port up front instead of reading it back from the first
server. TQ012 in scripts/check_test_quality.py rejects a port-0 bind read
back with getsockname anywhere under tests/integration.

* ci(integration): record listening sockets and the ephemeral port range

* Revert "ci(integration): record listening sockets and the ephemeral port range"

This reverts commit d3fafc3da2.
2026-10-15 16:56:40 -07:00
..
_a2a_peers.py fix(a2a): add per-agent a2a_protocol_version override for langgraph-api 0.15 cards (#44463) 2026-10-13 09:04:36 -04:00
_status_code_audit.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
test_a2a_protocol_version_bridge.py fix(a2a): add per-agent a2a_protocol_version override for langgraph-api 0.15 cards (#44463) 2026-10-13 09:04:36 -04:00
test_a2a_protocol_version_errors.py fix(a2a): add per-agent a2a_protocol_version override for langgraph-api 0.15 cards (#44463) 2026-10-13 09:04:36 -04:00
test_a2a_protocol_version_override.py test(integration): hand every harness server a port from one per-worker block (#46761) 2026-10-15 16:56:40 -07:00
test_a2a_wire_versions.py test(integration): cover agents_a2a endpoint contracts (#44650) 2026-10-14 03:40:07 +00:00
test_audio_speech_wire.py test(integration): cover audio endpoint contracts (#44699) 2026-10-14 03:41:20 +00:00
test_audio_transcriptions_wire.py test(integration): cover audio endpoint contracts (#44699) 2026-10-14 03:41:20 +00:00
test_audio_translations_wire.py test(integration): cover audio endpoint contracts (#44699) 2026-10-14 03:41:20 +00:00
test_codex_model_catalog.py test: fix shared-provider discovery, Codex catalog size and generated master key mismatches in CircleCI suites (#44905) 2026-10-07 00:11:25 +00:00
test_embedding_path_aliases.py test(integration): cover embeddings endpoint contracts (#44660) 2026-10-14 03:38:12 +00:00
test_fine_tuning_jobs.py test(integration): cover fine_tuning endpoint contracts (#44697) 2026-10-14 08:31:51 +00:00
test_granian_admission_saturation.py test(integration): hand every harness server a port from one per-worker block (#46761) 2026-10-15 16:56:40 -07:00
test_integration_worker_cleanup.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_missing_body_param_status.py test(integration): hand every harness server a port from one per-worker block (#46761) 2026-10-15 16:56:40 -07:00
test_openai_consumer.py test(integration): cover chat_completions endpoint contracts (#44688) 2026-10-14 03:45:38 +00:00
test_openai_sdk_client_paths.py fix: support OpenAI SDK 3 while retaining SDK 2 compatibility (#44927) 2026-10-09 19:45:50 -07:00
test_openai_sdk_client_paths_chaos.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_persisted_toolsets.py test: add extension and browser integration contracts 2026-09-16 13:15:53 -07:00
test_prompt_management_routes.py test(integration): cover prompts_tags_caching endpoint contracts (#44686) 2026-10-14 04:10:31 +00:00
test_proxy_utils.py test(integration): cover config_utils endpoint contracts (#44737) 2026-10-14 07:00:23 +00:00
test_responses_openapi_schema.py fix(proxy): document request body and response schemas for the Responses API in OpenAPI (#42802) 2026-09-24 01:28:34 +00:00
test_status_code_followups.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
test_status_code_followups_chaos.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
test_status_code_followups_defaults.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
test_status_code_followups_requests.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
test_status_code_followups_usage_chat.py fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00