Подтвердить трек 2 реальными сбоями, нагрузкой и отчётом

This commit is contained in:
2026-11-20 07:05:16 +03:00
parent 42bf6aa702
commit ef1f470659
43 changed files with 11538 additions and 30 deletions
+2 -2
View File
@@ -58,11 +58,11 @@ def targeted():
errors.append(str(exc))
time.sleep(.05)
check(first is not None and first <= 10, 'slow API failover')
page = c.call('GET', '/api/v1/chats/' + chat['id'] + '/messages?limit=100', actor=alice)['json']
page = c.call('GET', '/api/v1/chats/' + chat['id'] + '/messages?limit=100', actor=alice, schema='MessagePage')['json']
messages = list(page['items'])
while page['next_cursor']:
from urllib.parse import quote
page = c.call('GET', '/api/v1/chats/' + chat['id'] + '/messages?limit=100&cursor=' + quote(page['next_cursor'], safe=''), actor=alice)['json']
page = c.call('GET', '/api/v1/chats/' + chat['id'] + '/messages?limit=100&cursor=' + quote(page['next_cursor'], safe=''), actor=alice, schema='MessagePage')['json']
messages.extend(page['items'])
found = {m['id'] for m in messages}
check(all(m['id'] in found for m in responses), 'acknowledged message lost')