From bb86e5b7e521b92fd4ae8a6b52f7fd03bd0e4a3c Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Fri, 10 Mar 2023 18:22:08 +0100 Subject: [PATCH] Fix test --- app/ocache/ocache_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/ocache/ocache_test.go b/app/ocache/ocache_test.go index 14a59b1a..843586b7 100644 --- a/app/ocache/ocache_test.go +++ b/app/ocache/ocache_test.go @@ -191,13 +191,12 @@ func TestOCache_GC(t *testing.T) { c := New(func(ctx context.Context, id string) (value Object, err error) { timesCalled.Add(1) return obj, nil - }, WithTTL(time.Millisecond*10)) + }, WithTTL(0)) val, err := c.Get(context.TODO(), "id") require.NoError(t, err) require.NotNil(t, val) assert.Equal(t, 1, c.Len()) - time.Sleep(time.Millisecond * 20) begin := make(chan struct{}) wg := sync.WaitGroup{} once := sync.Once{}