forked from mtusi2026/mtusi2026lab3
Record levels 3 and 4 again after the lab 2 carry over
The carry over of the lab 2 fixes changed the request pipeline, logout,
the worker shutdown budget and the stop hooks, so every level 3 and 4
record is taken again on b1c80ee: checks, own tests, smoke, stack,
storage, failover of both replicas, persistence, hooks, the lab 2 stack
tests, limits and the injected violations, lb-check, three detection
runs, failover-each and both rolling updates under k6.
All of them pass: 243 own tests, 12 stack tests, no failed request under
k6 in failover-each and in both rolling updates.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b1c80ee544
commit
f5fea5c59c
+36
-23
@@ -1,38 +1,51 @@
|
||||
date: 2026-10-29T20:16:02Z commit: a02d442
|
||||
$ make test-faults # BASE_URL=http://127.0.0.1:18083
|
||||
date: 2026-10-29T23:44:48Z commit: b1c80ee
|
||||
$ make test-faults
|
||||
BASE_URL="http://127.0.0.1:18083" .venv/bin/pytest -m stack -v -s student-tests/stack
|
||||
============================= test session starts ==============================
|
||||
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0
|
||||
platform darwin -- Python 3.14.5, pytest-9.1.1, pluggy-1.6.0 -- <repo>/.venv/bin/python
|
||||
cachedir: .pytest_cache
|
||||
rootdir: <repo>
|
||||
configfile: pyproject.toml
|
||||
plugins: asyncio-1.4.0, anyio-4.15.1
|
||||
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
|
||||
collected 10 items
|
||||
collecting ... collected 12 items
|
||||
|
||||
student-tests/stack/test_faults.py гонка 50 регистраций: 201×1, 409×49
|
||||
.чат с несуществующим участником: 400
|
||||
.неверный пароль: 401 за 0.015 с
|
||||
неизвестный пользователь: 401 за 0.014 с
|
||||
.logout: 204, затем 401, повтор 401
|
||||
.5 проверок токена: keyspace_hits 4 → 9
|
||||
.valkey остановлен, действующий токен: 200 за 0.005 с
|
||||
student-tests/stack/test_faults.py::test_registration_race_yields_exactly_one_user гонка 50 регистраций: 201×1, 409×49
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_chat_creation_rolls_back_on_unknown_member чат с несуществующим участником: 400 invalid_request
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_wrong_password_and_unknown_user_get_same_basic_challenge неверный пароль: 401 за 0.012 с
|
||||
неизвестный пользователь: 401 за 0.012 с
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_logout_then_token_is_dead logout: 204, затем 401, повтор 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_serves_repeated_checks 5 проверок токена: keyspace_hits 4 → 9
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_stopped_is_bypassed_but_logout_waits valkey остановлен, действующий токен: 200 за 0.004 с
|
||||
valkey остановлен, неизвестный токен: 401 за 0.003 с
|
||||
valkey остановлен: ready 200, вход 201, выход 503
|
||||
valkey снова запущен: повторный выход 204
|
||||
.рестарт valkey: ключей 15 → 15
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_restart_keeps_cache_and_revocations рестарт valkey: ключей 16 → 16
|
||||
рестарт valkey: живой 200, отозванный 401
|
||||
.FLUSHALL: живой 200, отозванный 401
|
||||
.postgres остановлен, ready: 503 за 0.003 с
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_valkey_flushall_loses_nothing FLUSHALL: живой 200, отозванный 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_postgres_stopped_gives_bounded_503_and_recovers postgres остановлен, ready: 503 за 0.004 с
|
||||
postgres остановлен, me: 503 за 0.003 с
|
||||
postgres остановлен, stranger: 503 за 0.003 с
|
||||
postgres остановлен, login: 503 за 0.003 с
|
||||
postgres остановлен, register: 503 за 0.015 с
|
||||
live внутри реплики 200; LB исключил все реплики ещё через 1.03 с
|
||||
postgres остановлен, stranger: 503 за 0.002 с
|
||||
postgres остановлен, login: 503 за 0.002 с
|
||||
postgres остановлен, register: 503 за 0.014 с
|
||||
live внутри реплики 200; LB исключил все реплики ещё через 0.93 с
|
||||
live через LB без реплик: 503 за 0.000 с
|
||||
postgres запущен: готовность через 2.3 с, прежний токен 200
|
||||
.рестарт api: готовность через 2.8 с, токен 200
|
||||
expires_at при входе 2026-10-29T21:16:16.447011Z, в БД после рестарта 2026-10-29T21:16:16.447011Z
|
||||
.
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it рестарт api: готовность через 2.6 с, токен 200
|
||||
expires_at при входе 2026-10-30T00:45:03.281184Z, в БД после рестарта 2026-10-30T00:45:03.281184Z
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_full_restart_keeps_session_until_logout restart.sh: готовность через 0.0 с, прежний токен 200, выход 204, затем 401
|
||||
PASSED
|
||||
student-tests/stack/test_faults.py::test_session_expires_after_restart_at_original_time срок сессии сокращён до 20 с, рестарт api: готовность через 1.5 с, до срока 200, после срока 401
|
||||
PASSED
|
||||
|
||||
============================= 10 passed in 19.53s ==============================
|
||||
exit=0
|
||||
============================= 12 passed in 48.83s ==============================
|
||||
|
||||
Reference in New Issue
Block a user