From 1c5cd2e0d2665dce445eeea2c040499993a64451 Mon Sep 17 00:00:00 2001 From: Fedor Korotkiy Date: Sun, 29 Mar 2020 13:09:18 +0000 Subject: [PATCH] Make test more stable. --- lrucache/cache_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lrucache/cache_test.go b/lrucache/cache_test.go index d890855..731b732 100644 --- a/lrucache/cache_test.go +++ b/lrucache/cache_test.go @@ -161,7 +161,7 @@ func BenchmarkCache_Set(b *testing.B) { b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { - c.Set(i, i) + c.Set(i % tc.cap, i) } }) }