forked from mtusi2026/mtusi2026lab7
7 — Т2302 — ебедев — на 5
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# 2026-11-22T19:20:07Z commit=n/a host=Linux 6.18.44-fc-v726 x86_64 cpus=2
|
||||
$ python3 student-tests/test_idempotency.py
|
||||
## idempotency across replicas (https://127.0.0.1:8443)
|
||||
PASS sequential replays: same 201 + same Message from different replicas 0.51s replicas=2, rows=1
|
||||
PASS 30 concurrent POSTs, same key + body, via LB -> exactly one message 1.13s per-replica responses {'api-1e51aed7': 17, 'api-bcdd60ed': 13}, rows=1
|
||||
PASS concurrent same key, two different bodies -> one message, others 201-same or 409 1.06s 201x10, 409x10
|
||||
PASS after commit: different body -> 409; reordered/whitespace JSON -> replay 0.04s
|
||||
PASS scope: user + chat + key (same key elsewhere is independent) 0.05s
|
||||
PASS key format: missing/empty/129 chars/invalid -> 400; 128 chars ok 0.09s
|
||||
PASS failed attempt does not claim the key (400/404 not recorded) 0.07s
|
||||
PASS replay re-checks session and access 0.32s
|
||||
PASS key older than IDEMPOTENCY_TTL_SECONDS is reusable (24 h window) 1.16s
|
||||
summary: 9 passed, 0 failed
|
||||
exit=0
|
||||
Reference in New Issue
Block a user