Port final lab 5 validation, session and PNG recovery fixes

This commit is contained in:
Artyom
2026-11-07 02:35:40 +03:00
parent 97feb04b3f
commit bc1d7aa771
41 changed files with 4363 additions and 53 deletions
+9 -3
View File
@@ -248,14 +248,20 @@ async def test_message_off_the_schema_goes_to_the_dead_letter_queue(
assert depth(rabbitmq, "attachments.process") == 0
async def test_failed_processing_is_requeued_and_retried(rabbitmq: dict[str, Any]) -> None:
@pytest.mark.parametrize("failures", [1, 12])
async def test_failed_processing_is_requeued_and_retried(
rabbitmq: dict[str, Any], failures: int
) -> None:
recorder, sent = Recorder(), job()
recorder.failures = 1
recorder.failures = failures
before = depth(rabbitmq, "attachments.process.dlq")
async with publisher(rabbitmq) as jobs:
await jobs.publish(sent.id, body(sent.payload()))
async with worker(rabbitmq, recorder):
await wait_for(lambda: recorder.jobs)
await wait_for(lambda: recorder.jobs, seconds=40)
await wait_for(lambda: depth(rabbitmq, "attachments.process") == 0)
assert recorder.jobs == [sent]
assert depth(rabbitmq, "attachments.process.dlq") == before
async def test_worker_account_cannot_publish(rabbitmq: dict[str, Any]) -> None: