"Recheck Cond":"((chat_id = '784ecbaf-2866-46fb-a540-60de53ca7e45'::uuid) AND (ROW(created_at, id) \u003e ROW('2026-12-01 18:50:30.409+00'::timestamp with time zone, 'b7df3404-b811-4c6b-abde-620eb65e01f4'::uuid)))",
"Rows Removed by Index Recheck":0,
"Exact Heap Blocks":58,
"Lossy Heap Blocks":0,
"Shared Hit Blocks":96,
"Shared Read Blocks":0,
"Shared Dirtied Blocks":0,
"Shared Written Blocks":0,
"Local Hit Blocks":0,
"Local Read Blocks":0,
"Local Dirtied Blocks":0,
"Local Written Blocks":0,
"Temp Read Blocks":0,
"Temp Written Blocks":0,
"Plans":[
{
"Node Type":"Bitmap Index Scan",
"Parent Relationship":"Outer",
"Parallel Aware":false,
"Async Capable":false,
"Index Name":"messages_history_idx",
"Startup Cost":0.00,
"Total Cost":4.41,
"Plan Rows":13,
"Plan Width":0,
"Actual Startup Time":0.145,
"Actual Total Time":0.145,
"Actual Rows":5000,
"Actual Loops":1,
"Index Cond":"((chat_id = '784ecbaf-2866-46fb-a540-60de53ca7e45'::uuid) AND (ROW(created_at, id) \u003e ROW('2026-12-01 18:50:30.409+00'::timestamp with time zone, 'b7df3404-b811-4c6b-abde-620eb65e01f4'::uuid)))",
api_test.go:157: status=400 body={"error":{"code":"invalid_request","message":"session create must not have a body","request_id":"b866cf4d-d1f3-4b3b-a4da-a4b3a80fcb18"}}
api_test.go:161: ✓ вход без JSON body
--- PASS: TestSessionRejectsJSONBody (0.03s)
=== RUN TestWrongPasswordLogoutAndIgnoredUserHeader
api_test.go:167: → неверный пароль, Basic на бизнес-методе, X-User-Id, logout
api_test.go:402: ✓ сбой PostgreSQL не стал анонимным доступом
--- PASS: TestPostgresDownIsNotAnonymous (0.11s)
=== RUN TestMessagesHistoryIndexExplain
explain_test.go:55: → вставка 10001 сообщений в один чат
explain_test.go:102: EXPLAIN plan: [
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.71,
"Total Cost": 43.75,
"Plan Rows": 13,
"Plan Width": 88,
"Actual Startup Time": 0.815,
"Actual Total Time": 0.821,
"Actual Rows": 51,
"Actual Loops": 1,
"Shared Hit Blocks": 96,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Sort",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Startup Cost": 43.71,
"Total Cost": 43.75,
"Plan Rows": 13,
"Plan Width": 88,
"Actual Startup Time": 0.814,
"Actual Total Time": 0.817,
"Actual Rows": 51,
"Actual Loops": 1,
"Sort Key": ["created_at", "id"],
"Sort Method": "top-N heapsort",
"Sort Space Used": 31,
"Sort Space Type": "Memory",
"Shared Hit Blocks": 96,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Bitmap Heap Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Relation Name": "messages",
"Alias": "messages",
"Startup Cost": 4.42,
"Total Cost": 43.47,
"Plan Rows": 13,
"Plan Width": 88,
"Actual Startup Time": 0.137,
"Actual Total Time": 0.497,
"Actual Rows": 5000,
"Actual Loops": 1,
"Recheck Cond": "((chat_id = '784ecbaf-2866-46fb-a540-60de53ca7e45'::uuid) AND (ROW(created_at, id) > ROW('2026-12-01 18:50:30.409+00'::timestamp with time zone, 'b7df3404-b811-4c6b-abde-620eb65e01f4'::uuid)))",
"Rows Removed by Index Recheck": 0,
"Exact Heap Blocks": 58,
"Lossy Heap Blocks": 0,
"Shared Hit Blocks": 96,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0,
"Plans": [
{
"Node Type": "Bitmap Index Scan",
"Parent Relationship": "Outer",
"Parallel Aware": false,
"Async Capable": false,
"Index Name": "messages_history_idx",
"Startup Cost": 0.00,
"Total Cost": 4.41,
"Plan Rows": 13,
"Plan Width": 0,
"Actual Startup Time": 0.131,
"Actual Total Time": 0.131,
"Actual Rows": 5000,
"Actual Loops": 1,
"Index Cond": "((chat_id = '784ecbaf-2866-46fb-a540-60de53ca7e45'::uuid) AND (ROW(created_at, id) > ROW('2026-12-01 18:50:30.409+00'::timestamp with time zone, 'b7df3404-b811-4c6b-abde-620eb65e01f4'::uuid)))",
"Shared Hit Blocks": 38,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
}
]
}
]
}
]
},
"Planning": {
"Shared Hit Blocks": 0,
"Shared Read Blocks": 0,
"Shared Dirtied Blocks": 0,
"Shared Written Blocks": 0,
"Local Hit Blocks": 0,
"Local Read Blocks": 0,
"Local Dirtied Blocks": 0,
"Local Written Blocks": 0,
"Temp Read Blocks": 0,
"Temp Written Blocks": 0
},
"Planning Time": 0.052,
"Triggers": [
],
"Execution Time": 0.842
}
]
explain_test.go:116: ✓ индекс истории подтверждён EXPLAIN на 10001 сообщении
--- PASS: TestMessagesHistoryIndexExplain (0.29s)
PASS
ok gavrilenko-sxdees/lab2/student-tests 3.997s
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.