Files
mtusi2026lab7/evidence/test-jobs-failures.txt

20 lines
3.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-11-22T19:22:04Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
$ python3 student-tests/test_jobs_failures.py
## pipeline failures (https://127.0.0.1:8443)
PASS defense: worker stopped → 202 → 409 → message ok → restart API+broker (volumes kept) → worker → ready 25.12s attachment 478e6b75: stream held 1→1 msgs across restart; ready 1.9s after worker start
PASS broker down: upload still 202 (job durable in outbox), ready after broker returns 11.88s 202 with broker stopped; events ['enqueued', 'published', 'claimed']
PASS crash between COMMIT and publish: relay of another process publishes, job reaches ready 22.50s api-fault (api-eb64d070) died after COMMIT; published by relay worker-7f11f86c; events ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS crash between publish ack and outbox mark: duplicate publish dropped by Nats-Msg-Id 25.01s second publish: duplicate=true, stream_seq=37; processed once
PASS worker crash after claim, before any side effect → lease takeover → ready 23.33s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.3s
PASS worker crash after S3 writes, before COMMIT → takeover rewrites the same keys, one result 24.12s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.7s; keys deterministic: ['crop.jpg', 'optimized.webp', 'thumbnail.jpg']
PASS worker crash after COMMIT, before ack → redelivery is a no-op (duplicate_ignored) 21.85s ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned', 'duplicate_ignored']
PASS hung worker (event loop blocked 45 s) loses lease; takeover commits; zombie commit is fenced 49.22s claimed t38 → takeover t39 → committed t39; zombie (t38) → lease_lost
PASS long but alive job (35 s > lease 20 s): heartbeat keeps the lease, no takeover, no duplicate 36.76s ready after 36.7s, ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS transient errors: retry with backoff + jitter (2 failures), then ready 6.85s delays 1.60s, 2.69s (windows [1,2], [2,4]); actual gaps [1.99, 3.01]; attempts [1, 2, 3]
PASS retries exhausted → failed retry_exhausted (in registry) → operator replay → ready 28.58s 5 attempts → retry_exhausted; replay (attempt 6) → ready
PASS processing with expired lease and LOST message → reaper requeues → ready 11.27s purged 1 stream msgs; ['claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS bounded concurrency: never more than replicas × WORKER_CONCURRENCY jobs in processing 20.31s 8 jobs × ~4 s: peak concurrency 4 (limit 4), wall 9.5s
PASS staging removed after ready; failed staging kept until retention, then replay refuses honestly 9.80s ready: staging gone, originals/ present; failed: staging kept, removed after retention; replay refused
summary: 14 passed, 0 failed
exit=0