hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 3aa0e16d0caae7cbd084485cdb8ed65606a97b4c
parent b3c8056de24f6090d1fdf41707bc39cc57a9416a
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed, 28 Jun 2017 22:47:28 +0200

cache: Add even more concurrency to test

Diffstat:
Mcache/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
@@ -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()