Limit TestLongSiteWithDictionaries concurrency

This commit is contained in:
MoofMonkey 2022-10-04 05:50:06 +03:00
parent c053c1e8c4
commit 9d0c5d8ffa
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import (
"math/rand"
"net"
"os"
"runtime"
"strconv"
"strings"
"sync"
@ -976,9 +977,10 @@ func TestLongSiteWithDictionaries(t *testing.T) {
tstLen := 500
errGroup, _ := errgroup.WithContext(context.Background())
errGroup.SetLimit(runtime.NumGoroutine())
for i := 0; i < tstLen; i++ {
errGroup.Go(func() error {
path := paths[rand.Int()%len(paths)]
path := paths[rand.Intn(len(paths))]
return sampleSiteTest(muxPair, path, files)
})
}