diff --git a/buildscripts/kokoro/macos.cfg b/buildscripts/kokoro/macos.cfg index b7d1dd7d4d..50c0da6cdc 100644 --- a/buildscripts/kokoro/macos.cfg +++ b/buildscripts/kokoro/macos.cfg @@ -4,6 +4,14 @@ build_file: "grpc-java/buildscripts/kokoro/unix.sh" timeout_mins: 45 +# We had problems with random tests timing out because it took seconds to do +# trivial (ns) operations. The Mac machines have 2 cores with 4 logical +# threads, so Gradle should be using 4 workers by default. +env_vars { + key: "GRADLE_FLAGS" + value: "--max-workers=2" +} + # We always build mvn artifacts. action { define_artifacts { diff --git a/buildscripts/kokoro/unix.sh b/buildscripts/kokoro/unix.sh index 27a50143aa..3106f00793 100755 --- a/buildscripts/kokoro/unix.sh +++ b/buildscripts/kokoro/unix.sh @@ -30,7 +30,7 @@ ARCH="$ARCH" buildscripts/make_dependencies.sh # Set properties via flags, do not pollute gradle.properties GRADLE_FLAGS="${GRADLE_FLAGS:-}" -GRADLE_FLAGS+=" -PtargetArch=x86_$ARCH $GRADLE_FLAGS" +GRADLE_FLAGS+=" -PtargetArch=x86_$ARCH" GRADLE_FLAGS+=" -Pcheckstyle.ignoreFailures=false" GRADLE_FLAGS+=" -PfailOnWarnings=true" GRADLE_FLAGS+=" -PerrorProne=true"