Files
mtusi2026lab4/evidence/tests/student-test-lb.md
T
ricoromaandClaude Opus 5.5 6970dad871 docs: re-measure attachments rollout on a clean tree and update report
- bench_rollout label attachments from e1f8531 (dirty: false):
  replacement 8.67 s, 0 errors, 12001 messages = keys
- student_test through LB (197 passed) and failure_checks (24/24)
  after verify fixes
- REPORT: upload memory ~1.2 bodies with fixed mmap threshold,
  strict UTF-8 filename, env does not change attachment limits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 02:26:35 +03:00

4.4 KiB
Raw Blame History

make student_test через балансировщик

  • Дата: 2026-10-20, 23:20:52–23:21:29 UTC (второй прогон pytest -v для подсчёта по модулям — сразу после, тот же итог).
  • Commit: e1f8531 (код приложения и тестов — dba40bc, правки по verify change attachments); незакоммичен только новый каталог evidence/rollout/attachments/.
  • Стенд: рабочий mtusi-lab4 — BASE_URL=http://localhost:8080 (HAProxy), EXPECT_REPLICAS=2 (API_REPLICAS): реплики 6984b466278c и 9ed691f85e94, PostgreSQL, Valkey, S3. Тесты реплик выполняются, проверки отказов (fault) — нет (-m 'not fault', их гоняет make failure_checks, failure-checks.md).
  • Файлы исключений сверки покрытия сняты на стенде лабы 4 (commit 8dc925e: evidence/cache/hits.md, evidence/auth/passwords-and-tokens.md, evidence/idempotency/replay-after-restart.md, evidence/replicas/test-persistence.md, evidence/attachments/failover.md, evidence/attachments/storage.md): test_exclusion_evidence_exists зелёный.

Итог

$ make student_test
coverage: 202 scenarios in 12 specs, 187 tested (23 by make failure_checks), 15 excluded
===================== 197 passed, 24 deselected in 36.38s ======================
exit=0

По модулям

  21 student-tests/test_api_conventions.py PASSED
  33 student-tests/test_attachments.py PASSED
   4 student-tests/test_chat_cache.py PASSED
  13 student-tests/test_chats.py PASSED
  12 student-tests/test_contract.py PASSED
   9 student-tests/test_coverage.py PASSED
   3 student-tests/test_data_storage.py PASSED
   4 student-tests/test_health.py PASSED
  20 student-tests/test_idempotency.py PASSED
  10 student-tests/test_identification.py PASSED
   2 student-tests/test_load_balancing.py PASSED
  15 student-tests/test_messages.py PASSED
  14 student-tests/test_pagination.py PASSED
   4 student-tests/test_race.py PASSED
  12 student-tests/test_rubric.py PASSED
  10 student-tests/test_sessions.py PASSED
  11 student-tests/test_users.py PASSED

Строки тестов реплик и гонок (-rsP)

uploaded via 6984b466278c, downloaded via ['6984b466278c', '9ed691f85e94']
sent via 6984b466278c, replayed via ['9ed691f85e94']
409 via ['6984b466278c', '9ed691f85e94']
one session, 20 requests: {'9ed691f85e94': 10, '6984b466278c': 10}
written via 6984b466278c, read via {'9ed691f85e94': 3, '6984b466278c': 3}
race: 10 clients x 10 messages, statuses {201: 100}, max in flight 10; history: 100 messages, 100 unique ids, 4 pages by 30
username race: 10 clients, statuses {409: 9, 201: 1}, max in flight 10
key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages
key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages
key race through replicas: {'9ed691f85e94': 5, '6984b466278c': 5}
  • Вложения лабы 4: 33 теста спека attachments (test_attachments.py) и пять сценариев рубрики «4» лабы 4 в test_rubric.py (слишком большой файл, повреждённое изображение, подмена MIME, чужое attachment_id, вложение другого чата): каждая ошибка клиента — 4xx в формате контракта, не 500. «Скачивание через другую реплику»: загрузку принял 6984b466278c, оригинал отдал 9ed691f85e94.
  • Новый после verify тест test_filename_not_utf8 (сценарий «Имя не в UTF-8»): filename=a%FFb.png, a%C3.png, a%ED%A0%80b.png — 400, %C3%A9t%C3%A9.png — 201 с été.png. На коде до правки (8dc925e) все три первых давали 201 (U+FFFD вместо байта).
  • Уровень 4 лаб 2–3: 100 сообщений от 10 клиентов — 100 уникальных в истории; гонка регистрации — один 201; гонка одного ключа через реплики — одно сообщение.
  • Сверка покрытия: все 202 сценария 12 спеков — тест (187, из них 23 проверками отказов) или исключение с доказательством (15).