forked from mtusi2026/mtusi2026lab2
реализация второй лабы
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
UTC: 2026-10-22T11:17:22.562634+00:00
|
||||
Host: Darwin arm64 Python 3.11.9
|
||||
Docker: 29.0.1 aarch64 CPUs=10 RAM=8217448448
|
||||
Commit: 9961362 + working tree
|
||||
Command: ./scripts/check-docker.sh; project: lab2-check-ae280d00db
|
||||
PASS: start.sh built and started the stack, readiness reached
|
||||
api image=sha256:0b3dc5056cced642eea5ade11d235dce9f69f0d9e6d63956ce9479f2deaa10a0 started=2026-10-22T11:17:27.057932632Z memory=268435456 nano_cpus=1000000000
|
||||
postgres image=sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3 started=2026-10-22T11:17:24.411773881Z memory=536870912 nano_cpus=1000000000
|
||||
valkey image=sha256:fea8b3e67b15729d4bb70589eb03367bab9ad1ee89c876f54327fc7c6e618571 started=2026-10-22T11:17:24.406509756Z memory=134217728 nano_cpus=500000000
|
||||
PASS: non-root UID 10001; Python PID 1; healthcheck; named volumes; no API data volume
|
||||
Проверяем сервер: http://127.0.0.1:61900
|
||||
/Users/vanek/Desktop/VNPlabs/VNPlab2/mtusi2026lab2/.venv/bin/python scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
/Users/vanek/Desktop/VNPlabs/VNPlab2/mtusi2026lab2/.venv/bin/python tests/smoke.py --base-url "http://127.0.0.1:61900"
|
||||
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
|
||||
test_chat_access (test_api.ApiTests.test_chat_access) ... ok
|
||||
test_chat_pagination_and_cursor_owner (test_api.ApiTests.test_chat_pagination_and_cursor_owner) ... ok
|
||||
test_cursor_cannot_be_used_for_another_chat_or_changed (test_api.ApiTests.test_cursor_cannot_be_used_for_another_chat_or_changed) ... ok
|
||||
test_default_page_size (test_api.ApiTests.test_default_page_size) ... ok
|
||||
test_duplicate_username (test_api.ApiTests.test_duplicate_username) ... ok
|
||||
test_framework_errors_and_request_ids (test_api.ApiTests.test_framework_errors_and_request_ids) ... ok
|
||||
test_identification_and_authentication_order (test_api.ApiTests.test_identification_and_authentication_order) ... ok
|
||||
test_invalid_chat_members (test_api.ApiTests.test_invalid_chat_members) ... ok
|
||||
test_invalid_chat_title (test_api.ApiTests.test_invalid_chat_title) ... ok
|
||||
test_invalid_limits_and_cursors (test_api.ApiTests.test_invalid_limits_and_cursors) ... ok
|
||||
test_invalid_message_fields (test_api.ApiTests.test_invalid_message_fields) ... ok
|
||||
test_invalid_user_fields (test_api.ApiTests.test_invalid_user_fields) ... ok
|
||||
test_malformed_json_and_encoding (test_api.ApiTests.test_malformed_json_and_encoding) ... ok
|
||||
test_message_pagination_and_changing_limit (test_api.ApiTests.test_message_pagination_and_changing_limit) ... ok
|
||||
test_unicode_and_text_preservation (test_api.ApiTests.test_unicode_and_text_preservation) ... ok
|
||||
test_wrong_content_type (test_api.ApiTests.test_wrong_content_type) ... ok
|
||||
test_simultaneous_registration_of_one_username (test_concurrency.ConcurrencyTests.test_simultaneous_registration_of_one_username) ... ok
|
||||
test_ten_clients_send_one_hundred_messages (test_concurrency.ConcurrencyTests.test_ten_clients_send_one_hundred_messages) ... ok
|
||||
test_logout_revokes_only_one_session (test_sessions.SessionTests.test_logout_revokes_only_one_session) ... ok
|
||||
test_password_validation (test_sessions.SessionTests.test_password_validation) ... ok
|
||||
test_sql_like_message_is_plain_text (test_sessions.SessionTests.test_sql_like_message_is_plain_text) ... ok
|
||||
test_unicode_password_with_colon_and_private_response (test_sessions.SessionTests.test_unicode_password_with_colon_and_private_response) ... ok
|
||||
test_wrong_password_and_basic_only_for_login (test_sessions.SessionTests.test_wrong_password_and_basic_only_for_login) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 23 tests in 5.743s
|
||||
|
||||
OK
|
||||
PASS: 10 clients sent 100 messages; history contains exactly 100 unique messages.
|
||||
PASS: demo.sh registered users, logged in and read two messages
|
||||
PASS: Argon2id in PostgreSQL; logs do not contain message text, passwords or session tokens
|
||||
PASS: failed membership insert rolled back chat; migrations run twice without duplicate data
|
||||
/Users/vanek/Desktop/VNPlabs/VNPlab2/mtusi2026lab2/.venv/bin/python tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:61900"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
Restart api 2026-10-22T11:17:27.057932632Z -> 2026-10-22T11:17:45.460071626Z
|
||||
Restart postgres 2026-10-22T11:17:24.411773881Z -> 2026-10-22T11:17:44.637353001Z
|
||||
Restart valkey 2026-10-22T11:17:24.406509756Z -> 2026-10-22T11:17:44.670095293Z
|
||||
PASS: API, PostgreSQL and Valkey really restarted; previous token still works
|
||||
PASS: valkey unavailable -> 503 in 0.11s; anonymous -> 401; readiness 503, liveness 200
|
||||
API ready
|
||||
PASS: valkey recovered without a new login
|
||||
PASS: postgres unavailable -> 503 in 2.01s; anonymous -> 401; readiness 503, liveness 200
|
||||
API ready
|
||||
PASS: postgres recovered without a new login
|
||||
API ready
|
||||
PASS: SESSION_TTL_SECONDS=2; valid token expires without logout
|
||||
PASS: SIGTERM with unfinished request: 5.54s; new requests refused after 0.16s; exit=0; OOM=false
|
||||
PASS: all lab2 Docker checks completed
|
||||
PASS: stop.sh removed containers and preserved named volumes
|
||||
Removed only temporary Compose project and its test volumes: lab2-check-ae280d00db
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,32 @@
|
||||
Research project: lab2-research-85021a09d9
|
||||
Measuring two indexes on the same 100000 messages, three repeats...
|
||||
{
|
||||
"chat_only": {
|
||||
"insert_100000_median_ms": 1386.7587500000127,
|
||||
"index_bytes": 671744,
|
||||
"wal_bytes_median": 38822560,
|
||||
"queries": 180,
|
||||
"errors": 0,
|
||||
"concurrency": 1,
|
||||
"p50_ms": 1.6852079999978287,
|
||||
"p95_ms": 7.566457999985232,
|
||||
"p99_ms": 46.40233399999261,
|
||||
"successful_sql_rps": 282.01364182715855
|
||||
},
|
||||
"history": {
|
||||
"insert_100000_median_ms": 1404.4910420000178,
|
||||
"index_bytes": 7315456,
|
||||
"wal_bytes_median": 43108512,
|
||||
"queries": 180,
|
||||
"errors": 0,
|
||||
"concurrency": 1,
|
||||
"p50_ms": 0.22610399997802233,
|
||||
"p95_ms": 0.29704099995342403,
|
||||
"p99_ms": 0.3384169999662845,
|
||||
"successful_sql_rps": 4322.810483886352
|
||||
}
|
||||
}
|
||||
PASS: backup 0.54s; restore 0.68s; 100000 messages, all hashes and 12 samples match
|
||||
PASS: restored into a different container and fresh volume; one post-backup commit is absent as expected
|
||||
Results: evidence/research.json, evidence/query-plans.json; dump stays outside Git in backups/
|
||||
Removed only temporary research project: lab2-research-85021a09d9
|
||||
Reference in New Issue
Block a user