litellm/tests/integration/streaming
Yuneng Jiang f0bc6c31f8
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.
2026-10-15 14:07:13 -07:00
..
faked_responses_case.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_assistants_evals_stream.py test(integration): pin assistants and evals endpoint contracts (#44734) 2026-10-14 07:08:35 +00:00
test_azure_streaming_function_calls.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
test_decision_model_buffering.py fix(guardrails): honor decision model streaming buffering (#46086) 2026-10-12 16:28:22 -07:00
test_decision_model_pipeline_buffering.py fix(guardrails): honor decision model streaming buffering (#46086) 2026-10-12 16:28:22 -07:00
test_faked_responses_stream_bridges.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_faked_responses_stream_cache_replay.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_faked_responses_stream_chaos.py test(integration): hand every harness server a port from one per-worker block 2026-10-15 14:07:13 -07:00
test_faked_responses_stream_guardrail_blocks.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_faked_responses_stream_items.py fix(responses): open faked stream items empty so tool arguments and text arrive once (#46533) 2026-10-15 09:35:12 -07:00
test_file_content_streaming.py test(integration): regression tests for July provider translation, routing and streaming bugs (#42693) 2026-09-23 09:51:06 -07:00
test_google_genai_stream_usage_settings_wire.py fix(vertex_ai): route Model Garden models through the generateContent adapter (#41836) 2026-10-15 08:06:49 -07:00
test_interception_converted_stream_options.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_openai_like_stream_usage_wire.py fix(vertex_ai): route Model Garden models through the generateContent adapter (#41836) 2026-10-15 08:06:49 -07:00
test_openai_stream_passthrough_fields.py test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
test_responses_bridge_stream_chaos.py test(integration): hand every harness server a port from one per-worker block 2026-10-15 14:07:13 -07:00
test_responses_bridge_stream_errors.py test(integration): hand every harness server a port from one per-worker block 2026-10-15 14:07:13 -07:00
test_responses_top_level_error_events.py fix(responses): keep the provider code and message on top-level stream error events (#46438) 2026-10-14 16:16:46 -07:00
test_stream_contracts.py test(integration): cover health_routing endpoint contracts (#44744) 2026-10-14 06:34:22 +00:00
test_stream_open_error_provider_headers_proxy.py test(integration): hand every harness server a port from one per-worker block 2026-10-15 14:07:13 -07:00
test_stream_parallel_slot_release.py test(integration): regression tests for August provider translation and streaming bugs (#42621) 2026-09-22 20:52:00 -07:00
test_ttft_keepalive.py test(integration): regression tests for August provider translation and streaming bugs (#42621) 2026-09-22 20:52:00 -07:00