Merge pull request #11803 from sharifelgamal/mac-test

try less parallelization for macOS tests
pull/11844/head
Sharif Elgamal 2021-06-30 14:17:48 -07:00 committed by GitHub
commit d8f8e3faf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -34,13 +34,6 @@ EXTRA_TEST_ARGS=""
EXPECTED_DEFAULT_DRIVER="docker"
EXTERNAL="yes"
# fix mac os as a service on mac os
# https://github.com/docker/for-mac/issues/882#issuecomment-506372814
#osascript -e 'quit app "Docker"'
#/Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended || true
#osascript -e 'quit app "Docker"'
#/Applications/Docker.app/Contents/MacOS/Docker --unattended &
begin=$(date +%s)
while [ -z "$(docker info 2> /dev/null )" ];
do

View File

@ -97,11 +97,16 @@ 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
// Windows and MacOS tests were failing from timeouts due to too much parallelism
if runtime.GOOS == "windows" {
limit /= 2
}
// Hardcode limit to 2 for macOS
if runtime.GOOS == "darwin" {
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)