fixed a bug with NUL in strings

This commit is contained in:
Нурлыгаянова Екатерина
2026-10-29 14:34:10 +03:00
parent 98ffd9ff45
commit 5021df4ea8
10 changed files with 177 additions and 36 deletions
+19 -17
View File
@@ -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