litellm/tests/test_litellm/proxy/db
Yuneng Jiang 288d403529
[Fix] Preserve in-memory spend updates when Redis rpush fails
store_in_memory_spend_updates_in_redis drained the in-memory queues
into local variables before the rpush pipeline. If rpush raised (cloud
Redis hiccup, timeout, connection blip), those already-drained
transactions were garbage-collected with the scheduler job, silently
losing all spend aggregated during that tick.

Wrap the rpush in try/except. On failure, re-enqueue the aggregated
transactions into their respective in-memory queues so the next
scheduler tick retries.

Add a unit test that seeds real queues, simulates an rpush failure,
and asserts the transactions land back in-memory.
2026-04-22 14:10:40 -07:00
..
db_transaction_queue [Fix] Preserve in-memory spend updates when Redis rpush fails 2026-04-22 14:10:40 -07:00
mcp_server
test_check_migration.py build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
test_create_views.py [Fix] should_create_missing_views returns False for reltuples=0 (falsy zero bug) 2026-04-18 11:00:09 -07:00
test_db_spend_update_writer.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_exception_handler.py fix(proxy): restore broad is_database_connection_error; add is_database_transport_error for reconnect (#21796) 2026-02-21 12:04:00 -08:00
test_prisma_client.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_prisma_self_heal.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_rds_iam_token_expiry.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_tool_registry_writer.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00