Skip to content

Commit

Permalink
test time adj
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 10, 2023
1 parent 56959cb commit 4ffd39c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/bot/spam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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()
}
Expand Down

0 comments on commit 4ffd39c

Please sign in to comment.