From 8fab7ec5e3c63131295bb239d12ec86a54d6af9b Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 14 Jul 2015 12:12:57 +0200 Subject: [PATCH] Decrease timing sensitivity of ignore.TestCache --- internal/ignore/cache_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/ignore/cache_test.go b/internal/ignore/cache_test.go index d1fd3f6c9..139abbb59 100644 --- a/internal/ignore/cache_test.go +++ b/internal/ignore/cache_test.go @@ -52,14 +52,16 @@ func TestCache(t *testing.T) { // Sleep and access, to get some data for clean - time.Sleep(100 * time.Millisecond) + time.Sleep(500 * time.Millisecond) + c.get("true") + time.Sleep(100 * time.Millisecond) - // "false" was accessed 200 ms ago, "true" was accessed 100 ms ago. + // "false" was accessed ~600 ms ago, "true" was accessed ~100 ms ago. // This should clean out "false" but not "true" - c.clean(150 * time.Millisecond) + c.clean(300 * time.Millisecond) // Same values should exist