Remove assertion of order

This commit is contained in:
Nuno Campos
2024-12-30 19:26:18 +00:00
parent 76199701b0
commit 01e5ecedfd
+14 -10
View File
@@ -284,21 +284,25 @@ async def test_checkpoint_put_after_cancellation() -> None:
await asyncio.sleep(0.2)
t.cancel()
# check logs before cancellation is handled
assert logs == [
"checkpoint.aput.start",
"awhile.start",
], "Cancelled before checkpoint put started"
assert logs == sorted(
[
"checkpoint.aput.start",
"awhile.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",
"awhile.end",
"checkpoint.aput.end",
], "Checkpoint put is not cancelled"
assert logs == sorted(
[
"checkpoint.aput.start",
"awhile.start",
"awhile.end",
"checkpoint.aput.end",
]
), "Checkpoint put is not cancelled"
else:
assert False, "Task should be cancelled"