Files
mtusi2026lab4/evidence/tests/student-test-lb.md
T
2026-10-22 20:23:01 +03:00

86 lines
5.2 KiB
Markdown
Raw 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.
# `make student_test` через балансировщик
- Дата: 2026-10-22, 16:35:03–16:35:42 UTC (пересъёмка после change
`track2-reconciler`; второй прогон 16:35:55–16:36:33 — счёт по модулям).
- Commit: `c1648d9`, дерево чистое.
- Стенд: рабочий `mtusi-lab4` после порядка обновления change (`docker
compose up -d s3-bootstrap` → `make rolling_update` → `docker compose up
-d --no-deps cleaner`, 16:32–16:34) — `BASE_URL=http://localhost:8090`:
**LB на 8090, а не на 8080 из `.env`**, порт 8080 хоста занят
контейнером другого проекта (`domains-api-1`); `EXPECT_REPLICAS=2`
(`API_REPLICAS`): реплики `151df4af59c3` и `b5c48ae854d1`, PostgreSQL на
ревизии `5c3e1f0a9b7d`, Valkey, S3, уборщик с плановой сверкой. Тесты
реплик выполняются, проверки отказов (`fault`) — нет (`-m 'not fault'`,
их гоняет `make failure_checks`, `failure-checks.md`).
- Что изменилось с прежнего снимка (commit `ce1ae2c`): change
`track2-reconciler` — восемь новых проверок отказов сверки bucket и БД
(`deselected` 45 вместо 37) и 13 новых сценариев в основных спеках:
12 у `storage-consistency` (сверка, её безопасность, потерянный
оригинал, отказы хранилищ, плановая сверка) и «Потерянный оригинал» у
`attachments`. Все они покрыты проверками отказов: итог сверки — 240
сценариев в 13 спеках, 223 с тестами (58 — проверками отказов), 17
исключений. Тестов вне `fault` change не добавил: 198, как раньше.
- Файлы исключений сверки покрытия есть в репозитории, новых исключений
нет: `test_exclusion_evidence_exists` зелёный.
## Итог
```
$ make student_test BASE_URL=http://localhost:8090
collecting ... collected 243 items / 45 deselected / 198 selected
coverage: 240 scenarios in 13 specs, 223 tested (58 by make failure_checks), 17 excluded
===================== 198 passed, 45 deselected in 38.55s ======================
exit=0
```
## По модулям
```
21 student-tests/test_api_conventions.py PASSED
34 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`)
```
two series of 18 requests: {'151df4af59c3': 18, 'b5c48ae854d1': 18}
uploaded via 151df4af59c3, downloaded via ['151df4af59c3', 'b5c48ae854d1']
coverage: 240 scenarios in 13 specs, 223 tested (58 by make failure_checks), 17 excluded
sent via 151df4af59c3, replayed via ['b5c48ae854d1']
409 via ['151df4af59c3', 'b5c48ae854d1']
one session, 20 requests: {'b5c48ae854d1': 10, '151df4af59c3': 10}
written via 151df4af59c3, read via {'b5c48ae854d1': 3, '151df4af59c3': 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: {'151df4af59c3': 5, 'b5c48ae854d1': 5}
```
- Вложения лабы 4: 34 теста спека `attachments` и пять сценариев рубрики
«4» лабы 4 в `test_rubric.py` — прежние, на новом коде (ветка
`lost_at` в скачивании касается только помеченных сверкой вложений).
«Скачивание через другую реплику»: загрузку принял `151df4af59c3`,
оригинал отдали обе реплики.
- Уровень 4 лаб 2–3: 100 сообщений от 10 клиентов — 100 уникальных в
истории; гонка регистрации — один 201; гонка одного ключа через
реплики — одно сообщение.
- Сверка покрытия: все 240 сценариев 13 спеков — тест (223, из них 58
проверками отказов, в том числе все 21 сценарий `storage-consistency`)
или исключение с доказательством (17).