diff --git a/app/bot/spam_test.go b/app/bot/spam_test.go index f55df319..98df1817 100644 --- a/app/bot/spam_test.go +++ b/app/bot/spam_test.go @@ -214,7 +214,7 @@ func TestSpamFilter_watch(t *testing.T) { err = os.WriteFile(spamSamplesFile, []byte(message), 0o600) require.NoError(t, err) // wait for reload to complete - time.Sleep(1 * time.Second) + time.Sleep(time.Millisecond * 800) assert.Equal(t, 1, len(mockDetector.LoadSamplesCalls())) assert.Equal(t, 1, len(mockDetector.LoadStopWordsCalls())) @@ -224,7 +224,7 @@ func TestSpamFilter_watch(t *testing.T) { err = os.WriteFile(spamSamplesFile, []byte(message), 0o600) require.NoError(t, err) // wait for reload to complete - time.Sleep(1 * time.Second) + time.Sleep(time.Millisecond * 800) assert.Equal(t, 2, len(mockDetector.LoadSamplesCalls())) cancel() }