diff --git a/fixedwindow_test.go b/fixedwindow_test.go index e66a36e..cad8b4d 100644 --- a/fixedwindow_test.go +++ b/fixedwindow_test.go @@ -45,7 +45,7 @@ func TestFixedWindow(t *testing.T) { require.Equal(t, 50, result.Counter()) require.True(t, result.TTL() >= msToDuration(0) && result.TTL() <= size) - time.Sleep(result.TTL()) // wait for the next window to start + time.Sleep(result.TTL() + 100*time.Millisecond) // wait for the next window to start result, err = counter.Count(ctx, key, 70) require.NoError(t, err)