Files
mtusi2026lab6/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-21T20:04:50Z 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 28.39s attachment 8fdfa0e4: 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 10.26s 202 with broker stopped; events ['enqueued', 'published', 'claimed']
PASS crash between COMMIT and publish: relay of another process publishes, job reaches ready 23.31s api-fault (api-876964dc) died after COMMIT; published by relay api-api-2ba718cd; 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 24.24s second publish: duplicate=true, stream_seq=800; processed once
PASS worker crash after claim, before any side effect → lease takeover → ready 23.62s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.6s
PASS worker crash after S3 writes, before COMMIT → takeover rewrites the same keys, one result 24.04s ['enqueued', 'published', 'claimed', 'lease_takeover', 'committed', 'published_version_changed', 'staging_cleaned'] in 23.6s; keys deterministic: ['crop.jpg', 'optimized.webp', 'thumbnail.jpg']
PASS worker crash after COMMIT, before ack → redelivery is a no-op (duplicate_ignored) 22.52s ['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 47.14s claimed t799 → takeover t800 → committed t800; zombie (t799) → lease_lost
PASS long but alive job (35 s > lease 20 s): heartbeat keeps the lease, no takeover, no duplicate 36.32s ready after 36.3s, ['enqueued', 'published', 'claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS transient errors: retry with backoff + jitter (2 failures), then ready 7.10s delays 1.56s, 3.97s (windows [1,2], [2,4]); actual gaps [1.7, 4.01]; attempts [1, 2, 3]
PASS retries exhausted → failed retry_exhausted (in registry) → operator replay → ready 28.29s 5 attempts → retry_exhausted; replay (attempt 6) → ready
PASS processing with expired lease and LOST message → reaper requeues → ready 15.50s purged 1 stream msgs; ['claimed', 'committed', 'published_version_changed', 'staging_cleaned']
PASS bounded concurrency: never more than replicas × WORKER_CONCURRENCY jobs in processing 18.46s 8 jobs × ~4 s: peak concurrency 4 (limit 4), wall 10.0s
PASS staging removed after ready; failed staging kept until retention, then replay refuses honestly 17.37s ready: staging gone, originals/ present; failed: staging kept, removed after retention; replay refused
summary: 14 passed, 0 failed
exit=0