Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Dec 30, 2024
1 parent 1d9c7ef commit 400d837
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/langgraph/tests/test_pregel_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,20 +349,20 @@ async def awhile(input: Any) -> None:
await asyncio.sleep(0.2)
t.cancel()
# check logs before cancellation is handled
assert logs == [
"checkpoint.aput.start",
assert sorted(logs) == [
"awhile.start",
"checkpoint.aput.start",
], "Cancelled before checkpoint put started"
# wait for task to finish
try:
await t
except asyncio.CancelledError:
# check logs after cancellation is handled
assert logs == [
"checkpoint.aput.start",
"awhile.start",
assert sorted(logs) == [
"awhile.end",
"awhile.start",
"checkpoint.aput.end",
"checkpoint.aput.start",
], "Checkpoint put is not cancelled"
else:
assert False, "Task should be cancelled"
Expand Down

0 comments on commit 400d837

Please sign in to comment.