From 95bc7683ea40ec90838589196fc590a4ba7887b0 Mon Sep 17 00:00:00 2001 From: d3m0k1d Date: Thu, 22 Jan 2026 00:25:50 +0300 Subject: [PATCH] fix: fix test for test server --- internal/storage/writer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/storage/writer_test.go b/internal/storage/writer_test.go index cb2aca7..659216b 100644 --- a/internal/storage/writer_test.go +++ b/internal/storage/writer_test.go @@ -14,7 +14,7 @@ func TestWrite(t *testing.T) { t.Fatal(err) } - resultCh := make(chan *LogEntry) + resultCh := make(chan *LogEntry, 100) // ← Добавь буфер go Write(d, resultCh) @@ -28,7 +28,7 @@ func TestWrite(t *testing.T) { close(resultCh) - time.Sleep(200 * time.Millisecond) + time.Sleep(2 * time.Second) err = d.db.QueryRow("SELECT ip FROM requests LIMIT 1").Scan(&ip) if err != nil {