Хранить отзывы сессий в PostgreSQL, сохранять U+0000, ограничить ожидание БД
This commit is contained in:
+4
-2
@@ -12,6 +12,7 @@
|
||||
import base64
|
||||
from datetime import datetime, timezone
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import statistics
|
||||
@@ -26,6 +27,7 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
OUT = ROOT / 'evidence' / 'track2'
|
||||
WARMUP, RUNS = 3, 15
|
||||
PROJECT_VOLUME = 'grigoriev-lab2_pgdata_restore'
|
||||
RESTORE_PORT = int(os.environ.get('RESTORE_API_PORT', '8081'))
|
||||
|
||||
VARIANTS = {
|
||||
'pk_only': [],
|
||||
@@ -323,8 +325,8 @@ def restore():
|
||||
in_restored = int(psql("SELECT count(*) FROM messages WHERE text = 'during dump'", service='postgres-restore'))
|
||||
times['api_restore_ready'] = timed(lambda: compose('up', '-d', '--wait', '--no-build', 'api-restore'))
|
||||
|
||||
status_me = api('GET', '/api/v1/users/me', 8081, token)[0]
|
||||
page = api('GET', '/api/v1/chats/%s/messages' % chat['id'], 8081, token)[1]
|
||||
status_me = api('GET', '/api/v1/users/me', RESTORE_PORT, token)[0]
|
||||
page = api('GET', '/api/v1/chats/%s/messages' % chat['id'], RESTORE_PORT, token)[1]
|
||||
api_ok = status_me == 200 and page['items'] == [message]
|
||||
mismatches = [k for k in CHECKSUMS if source[k] != restored[k]]
|
||||
data = {'environment': environment(), 'dump_bytes': dump_bytes, 'times_seconds': times,
|
||||
|
||||
Reference in New Issue
Block a user