Merge pull request #11804 from spowelljr/limitParallelizationWindows

Lower parallelism when testing on Windows
pull/11819/head
Steven Powell 2021-06-29 19:46:42 +00:00 committed by GitHub
commit 6e3aba593e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -97,6 +97,11 @@ func setMaxParallelism() {
// Each "minikube start" consumes up to 2 cores, though the average usage is somewhat lower
limit := int(math.Floor(float64(maxp) / 1.75))
// Windows tests were failing from timeouts due to too much parallelism
if runtime.GOOS == "windows" {
limit /= 2
}
fmt.Fprintf(os.Stderr, "Found %d cores, limiting parallelism with --test.parallel=%d\n", maxp, limit)
if err := flag.Set("test.parallel", strconv.Itoa(limit)); err != nil {
fmt.Fprintf(os.Stderr, "Unable to set test.parallel: %v\n", err)