From 05bd5557bfb4ae36275311c370fda69767a6deab Mon Sep 17 00:00:00 2001 From: da440dil Date: Thu, 17 Dec 2020 19:12:01 +0300 Subject: [PATCH] add 100 ms to time.Sleep() for ci test to pass --- fixedwindow_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)