Merge pull request #11803 from sharifelgamal/mac-test
try less parallelization for macOS testspull/11844/head
commit
d8f8e3faf7
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue