mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-16 04:29:31 +00:00
* 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
|
||
|---|---|---|
| .. | ||
| image | ||
| migrations | ||
| test_chunked_in_lists.py | ||
| test_cleanup_transactions.py | ||
| test_global_spend_refresh_writer.py | ||
| test_harness_lifecycle.py | ||
| test_managed_file_flat_ids_index.py | ||
| test_migration_entrypoint.py | ||
| test_partition_transactions.py | ||
| test_prisma_migration_lock.py | ||
| test_proxy_boot_without_general_settings.py | ||
| test_reader_writer_regeneration.py | ||
| test_request_log_indexes_at_boot.py | ||
| test_roi_observed.py | ||
| test_roi_sync_store.py | ||
| test_transaction_atomicity.py | ||
| test_v1_migration_error_logging.py | ||