forked from mtusi2026/mtusi2026lab5
исправление
This commit is contained in:
+30
-12
@@ -2,8 +2,26 @@ docker compose --profile tools run --rm db-test
|
||||
Container mtusi-lab5-postgres-1 Running
|
||||
Container mtusi-lab5-postgres-1 Waiting
|
||||
Container mtusi-lab5-postgres-1 Healthy
|
||||
Container mtusi-lab5-db-test-run-436c3e33e3cf Creating
|
||||
Container mtusi-lab5-db-test-run-436c3e33e3cf Created
|
||||
Container mtusi-lab5-db-test-run-dcea39c16e25 Creating
|
||||
Container mtusi-lab5-db-test-run-dcea39c16e25 Created
|
||||
test_1_replay_after_snapshot_keeps_staging (test_cleanup.CleanupRaceTest.test_1_replay_after_snapshot_keeps_staging) ...
|
||||
snapshot -> replay (queued) -> cleanup: kept [('staging/224e34a0-91da-415f-acc4-ecc686b36842', 'current_work')], nothing deleted
|
||||
ok
|
||||
test_2_cleanup_first_then_replay_waits_and_refuses (test_cleanup.CleanupRaceTest.test_2_cleanup_first_then_replay_waits_and_refuses) ...
|
||||
cleanup marked the staging deleted, holds the lock -> replay waited 1 s+ -> refused (source_missing); job stays failed; journal: staging_expired, replay_refused
|
||||
ok
|
||||
test_3_replay_first_then_cleanup_waits_and_keeps (test_cleanup.CleanupRaceTest.test_3_replay_first_then_cleanup_waits_and_keeps) ... ok
|
||||
test_4_upload_in_progress_is_skipped (test_cleanup.CleanupRaceTest.test_4_upload_in_progress_is_skipped)
|
||||
replay holds the lock -> cleanup waited -> kept [('staging/34b4b519-0cbc-4edb-baab-e86b337fdf38', 'current_work')]
|
||||
...
|
||||
upload between PUT and COMMIT -> cleanup skipped it (busy); after COMMIT -> current work, kept
|
||||
ok
|
||||
test_5_objects_of_processing_job_are_kept (test_cleanup.CleanupRaceTest.test_5_objects_of_processing_job_are_kept) ... ok
|
||||
test_6_regular_cleanup_still_works (test_cleanup.CleanupRaceTest.test_6_regular_cleanup_still_works) ...
|
||||
processing job (worker writes the original and variants before COMMIT) -> all 3 objects kept
|
||||
|
||||
orphan, staging after ready, objects of a failed attachment after retention -> deleted; published original and variants, a failed attachment within retention -> kept; dry-run deletes nothing
|
||||
ok
|
||||
test_backoff_bounds (test_jobs.JobsIntegrationTest.test_backoff_bounds) ... ok
|
||||
test_claim_once_and_concurrent_claims (test_jobs.JobsIntegrationTest.test_claim_once_and_concurrent_claims) ...
|
||||
10 concurrent claims of one job: 1 claimed, 9 in_progress
|
||||
@@ -15,29 +33,29 @@ test_permanent_error_fails_at_once (test_jobs.JobsIntegrationTest.test_permanent
|
||||
test_replay_rules (test_jobs.JobsIntegrationTest.test_replay_rules) ... ok
|
||||
test_retry_backoff_then_exhausted (test_jobs.JobsIntegrationTest.test_retry_backoff_then_exhausted) ... ok
|
||||
test_upload_creates_job_and_outbox_in_one_transaction (test_jobs.JobsIntegrationTest.test_upload_creates_job_and_outbox_in_one_transaction) ... ok
|
||||
test_concurrent_registration_has_one_winner (test_store.StoreIntegrationTest.test_concurrent_registration_has_one_winner) ... ok
|
||||
test_concurrent_same_idempotency_key_creates_one_row (test_store.StoreIntegrationTest.test_concurrent_same_idempotency_key_creates_one_row) ...
|
||||
test_concurrent_registration_has_one_winner (test_store.StoreIntegrationTest.test_concurrent_registration_has_one_winner) ...
|
||||
20 параллельных create_user: 1 создан, 19 получили Conflict (409)
|
||||
ok
|
||||
test_create_chat_rolls_back_when_failing_midway (test_store.StoreIntegrationTest.test_create_chat_rolls_back_when_failing_midway) ...
|
||||
test_concurrent_same_idempotency_key_creates_one_row (test_store.StoreIntegrationTest.test_concurrent_same_idempotency_key_creates_one_row) ...
|
||||
20 одновременных add_message с одним ключом: 1 строка, 1 новое + 19 повторов с тем же сообщением
|
||||
|
||||
ok
|
||||
test_create_chat_rolls_back_when_failing_midway (test_store.StoreIntegrationTest.test_create_chat_rolls_back_when_failing_midway) ... ok
|
||||
test_database_rejects_message_from_non_member (test_store.StoreIntegrationTest.test_database_rejects_message_from_non_member) ...
|
||||
чат с несуществующим участником: транзакция откатилась, строк chats/chat_members не осталось
|
||||
ok
|
||||
test_database_rejects_message_from_non_member (test_store.StoreIntegrationTest.test_database_rejects_message_from_non_member) ...
|
||||
|
||||
INSERT сообщения от не-участника напрямую в БД: ForeignKeyViolation
|
||||
ok
|
||||
test_migrations_rerun_is_noop (test_store.StoreIntegrationTest.test_migrations_rerun_is_noop) ...
|
||||
test_migrations_rerun_is_noop (test_store.StoreIntegrationTest.test_migrations_rerun_is_noop) ... ok
|
||||
test_old_version_insert_without_key_still_works (test_store.StoreIntegrationTest.test_old_version_insert_without_key_still_works) ...
|
||||
schema_migrations: ['001_core', '002_sessions', '003_text_as_bytes', '004_message_idempotency', '005_attachments', '006_jobs']; повторный migrate() ничего не применил
|
||||
ok
|
||||
test_old_version_insert_without_key_still_works (test_store.StoreIntegrationTest.test_old_version_insert_without_key_still_works) ...
|
||||
|
||||
INSERT как в lab2 (без ключа) после миграции 004 работает: старая версия совместима со схемой
|
||||
ok
|
||||
test_same_key_other_body_is_conflict (test_store.StoreIntegrationTest.test_same_key_other_body_is_conflict) ...
|
||||
тот же ключ с другим телом: Conflict (409), в базе по-прежнему одна строка
|
||||
ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 16 tests in 0.624s
|
||||
Ran 22 tests in 2.833s
|
||||
|
||||
OK
|
||||
|
||||
Reference in New Issue
Block a user