forked from mtusi2026/mtusi2026lab5
ЛР 5 — БВТ2302 — Лебедев — на 5
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# 2026-11-21T15:24:07Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_idempotency.py
|
||||
## idempotency across replicas (http://127.0.0.1:8080)
|
||||
PASS sequential replays: same 201 + same Message from different replicas 0.27s replicas=2, rows=1
|
||||
PASS 30 concurrent POSTs, same key + body, via LB -> exactly one message 0.84s per-replica responses {'api-634d0596': 16, 'api-113262fe': 14}, rows=1
|
||||
PASS concurrent same key, two different bodies -> one message, others 201-same or 409 0.85s 201x10, 409x10
|
||||
PASS after commit: different body -> 409; reordered/whitespace JSON -> replay 0.02s
|
||||
PASS scope: user + chat + key (same key elsewhere is independent) 0.03s
|
||||
PASS key format: missing/empty/129 chars/invalid -> 400; 128 chars ok 0.03s
|
||||
PASS failed attempt does not claim the key (400/404 not recorded) 0.02s
|
||||
PASS replay re-checks session and access 0.33s
|
||||
PASS key older than IDEMPOTENCY_TTL_SECONDS is reusable (24 h window) 0.50s
|
||||
summary: 9 passed, 0 failed
|
||||
exit=0
|
||||
Reference in New Issue
Block a user