Files
mtusi2026lab5/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-21T15:26:03Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
$ python3 student-tests/test_jobs_failures.py
## pipeline failures (http://127.0.0.1:8080)
PASS defense: worker stopped → 202 → 409 → message ok → restart API+broker (volumes kept) → worker → ready 22.57s attachment bc50ea5e: stream held 1→1 msgs across restart; ready 1.4s after worker start
PASS broker down: upload still 202 (job durable in outbox), ready after broker returns 9.24s 202 with broker stopped; events ['enqueued', 'published', 'claimed']
PASS crash between COMMIT and publish: relay of another process publishes, job reaches ready 7.42s api-fault (api-6fbb536e) died after COMMIT; published by relay worker-e1c56e52; 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 10.12s second publish: duplicate=true, stream_seq=36; processed once
PASS worker crash after claim, before any side effect → lease takeover → ready 22.66s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 22.6s
PASS worker crash after S3 writes, before COMMIT → takeover rewrites the same keys, one result 23.00s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 22.8s; keys deterministic: ['crop.jpg', 'optimized.webp', 'thumbnail.jpg']
PASS worker crash after COMMIT, before ack → redelivery is a no-op (duplicate_ignored) 21.47s ['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 46.74s claimed t37 → takeover t38 → committed t38; zombie (t37) → lease_lost
PASS long but alive job (35 s > lease 20 s): heartbeat keeps the lease, no takeover, no duplicate 36.82s ready after 36.8s, ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS transient errors: retry with backoff + jitter (2 failures), then ready 6.23s delays 1.79s, 3.08s (windows [1,2], [2,4]); actual gaps [1.81, 3.19]; attempts [1, 2, 3]
PASS retries exhausted → failed retry_exhausted (in registry) → operator replay → ready 29.16s 5 attempts → retry_exhausted; replay (attempt 6) → ready
PASS processing with expired lease and LOST message → reaper requeues → ready 7.64s purged 1 stream msgs; ['claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS bounded concurrency: never more than replicas × WORKER_CONCURRENCY jobs in processing 14.23s 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 12.24s ready: staging gone, originals/ present; failed: staging kept, removed after retention; replay refused
summary: 14 passed, 0 failed
exit=0