forked from mtusi2026/mtusi2026lab2
fixed a bug with NUL in strings
This commit is contained in:
@@ -1,34 +1,36 @@
|
||||
=== RUN TestUsernameRace
|
||||
integration_test.go:83: 20 параллельных регистраций: 1 created, 19 conflict, строк в users: 1
|
||||
--- PASS: TestUsernameRace (0.03s)
|
||||
integration_test.go:78: 20 параллельных регистраций: 1 created, 19 conflict, строк в users: 1
|
||||
--- PASS: TestUsernameRace (0.02s)
|
||||
=== RUN TestCreateChatRollback
|
||||
integration_test.go:123: неизвестный участник → 400, chats/chat_members без изменений; валидный вызов создаёт 1 чат
|
||||
--- PASS: TestCreateChatRollback (0.03s)
|
||||
integration_test.go:116: неизвестный участник → 400, chats/chat_members без изменений; валидный вызов создаёт 1 чат
|
||||
--- PASS: TestCreateChatRollback (0.01s)
|
||||
=== RUN TestMessageRequiresMembership
|
||||
--- PASS: TestMessageRequiresMembership (0.02s)
|
||||
--- PASS: TestMessageRequiresMembership (0.01s)
|
||||
=== RUN TestNULRoundTrip
|
||||
--- PASS: TestNULRoundTrip (0.07s)
|
||||
PASS
|
||||
ok gitflic.ru/project/relationskatie/mtusi2026lab1-ashchkl/internal/store/db 0.973s
|
||||
ok gitflic.ru/project/relationskatie/mtusi2026lab1-ashchkl/internal/store/db 0.861s
|
||||
=== RUN TestReadAfterWrite_FillRace
|
||||
=== RUN TestReadAfterWrite_FillRace/naive
|
||||
history_test.go:150: naive: чтение после подтверждённой записи stale=true
|
||||
history_test.go:141: naive: чтение после подтверждённой записи stale=true
|
||||
=== RUN TestReadAfterWrite_FillRace/safe
|
||||
history_test.go:150: safe: чтение после подтверждённой записи stale=false
|
||||
--- PASS: TestReadAfterWrite_FillRace (0.32s)
|
||||
history_test.go:141: safe: чтение после подтверждённой записи stale=false
|
||||
--- PASS: TestReadAfterWrite_FillRace (0.33s)
|
||||
--- PASS: TestReadAfterWrite_FillRace/naive (0.11s)
|
||||
--- PASS: TestReadAfterWrite_FillRace/safe (0.21s)
|
||||
--- PASS: TestReadAfterWrite_FillRace/safe (0.22s)
|
||||
=== RUN TestStampede_SQLCount
|
||||
=== RUN TestStampede_SQLCount/naive
|
||||
history_test.go:195: naive: 50 одновременных промахов → 50 запросов страницы в БД
|
||||
history_test.go:184: naive: 50 одновременных промахов → 50 запросов страницы в БД
|
||||
=== RUN TestStampede_SQLCount/safe
|
||||
history_test.go:195: safe: 50 одновременных промахов → 1 запросов страницы в БД
|
||||
--- PASS: TestStampede_SQLCount (0.16s)
|
||||
--- PASS: TestStampede_SQLCount/naive (0.09s)
|
||||
--- PASS: TestStampede_SQLCount/safe (0.07s)
|
||||
history_test.go:184: safe: 50 одновременных промахов → 1 запросов страницы в БД
|
||||
--- PASS: TestStampede_SQLCount (0.13s)
|
||||
--- PASS: TestStampede_SQLCount/naive (0.07s)
|
||||
--- PASS: TestStampede_SQLCount/safe (0.06s)
|
||||
=== RUN TestAccessCheckedBeforeCache
|
||||
--- PASS: TestAccessCheckedBeforeCache (0.01s)
|
||||
=== RUN TestCacheLossIsOnlyMiss
|
||||
--- PASS: TestCacheLossIsOnlyMiss (0.01s)
|
||||
=== RUN TestCacheDown_Bypass
|
||||
--- PASS: TestCacheDown_Bypass (0.03s)
|
||||
--- PASS: TestCacheDown_Bypass (0.00s)
|
||||
PASS
|
||||
ok gitflic.ru/project/relationskatie/mtusi2026lab1-ashchkl/internal/cache 1.197s
|
||||
ok gitflic.ru/project/relationskatie/mtusi2026lab1-ashchkl/internal/cache 1.621s
|
||||
|
||||
+15
-13
@@ -1,13 +1,14 @@
|
||||
# Миграции (2026-10-29T07:04:02Z)
|
||||
# Миграции (2026-10-29T11:33:55Z)
|
||||
|
||||
## 1. С нуля (проект mtusi-lab2-fresh, пустой volume)
|
||||
Container mtusi-lab2-fresh-postgres-1 Healthy
|
||||
Container mtusi-lab2-fresh-postgres-1 Healthy
|
||||
volume: mtusi-lab2-fresh_pgdata
|
||||
2026/10/29 07:04:09 OK 00001_create_users_table.sql (14.67ms)
|
||||
2026/10/29 07:04:09 OK 00002_create_chats_table.sql (6.31ms)
|
||||
2026/10/29 07:04:09 OK 00003_create_chat_members_table.sql (9.24ms)
|
||||
2026/10/29 07:04:09 OK 00004_create_messages_table.sql (10.81ms)
|
||||
2026/10/29 07:04:09 goose: successfully migrated database to version: 4
|
||||
2026/10/29 11:34:02 OK 00001_create_users_table.sql (2.16ms)
|
||||
2026/10/29 11:34:02 OK 00002_create_chats_table.sql (1.07ms)
|
||||
2026/10/29 11:34:02 OK 00003_create_chat_members_table.sql (1.56ms)
|
||||
2026/10/29 11:34:02 OK 00004_create_messages_table.sql (1.74ms)
|
||||
2026/10/29 11:34:02 OK 00005_escape_nul_in_text.sql (1.64ms)
|
||||
2026/10/29 11:34:02 goose: successfully migrated database to version: 5
|
||||
List of relations
|
||||
Schema | Name | Type | Owner
|
||||
--------+------------------+-------+-----------
|
||||
@@ -23,12 +24,13 @@ volume: mtusi-lab2-fresh_pgdata
|
||||
2|t
|
||||
3|t
|
||||
4|t
|
||||
5|t
|
||||
### повторный migrate на том же свежем volume
|
||||
2026/10/29 07:04:11 goose: no migrations to run. current version: 4
|
||||
Volume mtusi-lab2-fresh_pgdata Removed
|
||||
Network mtusi-lab2-fresh_default Removed
|
||||
2026/10/29 11:34:03 goose: no migrations to run. current version: 5
|
||||
Volume mtusi-lab2-fresh_pgdata Removed
|
||||
Network mtusi-lab2-fresh_default Removed
|
||||
|
||||
## 2. Повторный migrate на рабочем стенде (volume mtusi-lab2_pgdata сохраняется)
|
||||
до: 136 54 125 69369
|
||||
2026/10/29 07:04:14 goose: no migrations to run. current version: 4
|
||||
после: 136 54 125 69369
|
||||
до: 54 26 37 95882
|
||||
2026/10/29 11:34:04 goose: no migrations to run. current version: 5
|
||||
после: 54 26 37 95882
|
||||
|
||||
Reference in New Issue
Block a user