Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cache
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-06-28 23:47:28 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-06-28 23:47:28 +0300
commit3aa0e16d0caae7cbd084485cdb8ed65606a97b4c (patch)
tree4a7731811e189665e7b44f51096263034babf884 /cache
parentb3c8056de24f6090d1fdf41707bc39cc57a9416a (diff)
cache: Add even more concurrency to test
Diffstat (limited to 'cache')
-rw-r--r--cache/partitioned_lazy_cache_test.go10
1 files 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()