From 033e71bef7de7a47e2e1705559d4ac16c17072b6 Mon Sep 17 00:00:00 2001 From: iprotsiuk <42197193+iprotsiuk@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:39:25 -0700 Subject: [PATCH] fix flaky cache test (#604) increased timeout to 100ms in SimpleCacheTest Signed-off-by: Ivan Protsiuk Co-authored-by: Matthew Kocher --- src/pkg/simplecache/simplecache_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkg/simplecache/simplecache_test.go b/src/pkg/simplecache/simplecache_test.go index 5478c02bc..612e17196 100644 --- a/src/pkg/simplecache/simplecache_test.go +++ b/src/pkg/simplecache/simplecache_test.go @@ -1,9 +1,10 @@ package simplecache_test import ( - "code.cloudfoundry.org/loggregator-agent-release/src/pkg/simplecache" "time" + "code.cloudfoundry.org/loggregator-agent-release/src/pkg/simplecache" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) @@ -43,7 +44,7 @@ var _ = Describe("SimpleCache", func() { Eventually(func() bool { _, exists := cache.Get("key1") return exists - }).WithTimeout(6 * time.Millisecond).WithPolling(time.Millisecond).Should(BeFalse()) + }).WithTimeout(100 * time.Millisecond).WithPolling(time.Millisecond).Should(BeFalse()) }) It("handles concurrent access", func() {