Merge pull request #49770 from BerriAI/litellm_rc109_ledger_fault_injection

test(integration): fix rc109 ledger transaction expiry
This commit is contained in:
yuneng-jiang 2026-11-02 18:36:03 -08:00 • committed by GitHub
commit 26654fc154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -325,11 +325,11 @@ async def test_cost_requires_an_existing_outbound_source(writer: _Writer, ledger
async def test_interruption_rolls_back_or_retry_recognizes_commit(
writer: _Writer, ledger_database: str, failure: str
) -> None:
client, store = writer
_, store = writer
@asynccontextmanager
async def interrupted() -> AsyncGenerator[Prisma]:
async with client.writer_db.tx() as tx:
async with store._transaction() as tx:
yield tx
if failure == "before_commit":
raise RuntimeError("injected pre-commit failure")