litellm/tests/spend_tracking_tests
Yassin Kortam dd15fc0e74 fix(tests): poll proxy readiness instead of probing it once
The spend accuracy tests gate on GET /health/readiness/details and call
pytest.fail on the first probe that does not report db=connected. CI only waits
for port 4000 to answer before running them, and the proxy binds the port
before Prisma finishes connecting, so the gate races startup. Under pytest -x a
lost race kills the whole job in about 85s, well before the first spend
assertion, while a healthy run takes roughly 230s.

The gate now polls readiness for a bounded 60s. A proxy that is genuinely
broken still fails, just later and with the last observed status attached.
Connection errors during startup are treated as retryable rather than as a
verdict
2026-07-09 13:14:17 +03:00
..
test_ocr_spend_tracking.py chore(ci): modernize model references in tests and configs (#27856) 2026-05-15 15:44:28 -07:00
test_spend_accuracy_tests.py fix(tests): poll proxy readiness instead of probing it once 2026-07-09 13:14:17 +03:00