mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 08:12:06 -05:00
cache: Add even more concurrency to test
This commit is contained in:
parent
b3c8056de2
commit
3aa0e16d0c
1 changed files with 6 additions and 4 deletions
4
cache/partitioned_lazy_cache_test.go
vendored
4
cache/partitioned_lazy_cache_test.go
vendored
|
@ -123,13 +123,15 @@ func TestConcurrentPartitionedLazyCache(t *testing.T) {
|
||||||
|
|
||||||
cache := NewPartitionedLazyCache(p1, p2)
|
cache := NewPartitionedLazyCache(p1, p2)
|
||||||
|
|
||||||
for j := 0; j < 100; j++ {
|
for i := 0; i < 100; i++ {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
for j := 0; j < 10; j++ {
|
||||||
v, err := cache.Get("p1", "p1_1")
|
v, err := cache.Get("p1", "p1_1")
|
||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
assert.Equal("p1v1", v)
|
assert.Equal("p1v1", v)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
Loading…
Reference in a new issue