From 3aa0e16d0caae7cbd084485cdb8ed65606a97b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 28 Jun 2017 22:47:28 +0200 Subject: [PATCH] cache: Add even more concurrency to test --- cache/partitioned_lazy_cache_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cache/partitioned_lazy_cache_test.go b/cache/partitioned_lazy_cache_test.go index 97c8e09da..ba8b6a454 100644 --- a/cache/partitioned_lazy_cache_test.go +++ b/cache/partitioned_lazy_cache_test.go @@ -123,13 +123,15 @@ func TestConcurrentPartitionedLazyCache(t *testing.T) { cache := NewPartitionedLazyCache(p1, p2) - for j := 0; j < 100; j++ { + for i := 0; i < 100; i++ { wg.Add(1) go func() { defer wg.Done() - v, err := cache.Get("p1", "p1_1") - assert.NoError(err) - assert.Equal("p1v1", v) + for j := 0; j < 10; j++ { + v, err := cache.Get("p1", "p1_1") + assert.NoError(err) + assert.Equal("p1v1", v) + } }() } wg.Wait()