Make test more stable.

This commit is contained in:
Fedor Korotkiy 2020-03-29 13:09:18 +00:00
parent 52d9956d49
commit 1c5cd2e0d2

View file

@ -161,7 +161,7 @@ func BenchmarkCache_Set(b *testing.B) {
b.ResetTimer() b.ResetTimer()
b.ReportAllocs() b.ReportAllocs()
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
c.Set(i, i) c.Set(i % tc.cap, i)
} }
}) })
} }