mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test(integration): preserve ledger transaction policy during fault injection
This commit is contained in:
parent
6cd9a36ce5
commit
da336da4b5
1 changed files with 2 additions and 2 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue