shithub: hugo

Download patch

ref: 3aa0e16d0caae7cbd084485cdb8ed65606a97b4c
parent: b3c8056de24f6090d1fdf41707bc39cc57a9416a
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Jun 28 18:47:28 EDT 2017

cache: Add even more concurrency to test

--- a/cache/partitioned_lazy_cache_test.go
+++ b/cache/partitioned_lazy_cache_test.go
@@ -123,13 +123,15 @@
 
 	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()