File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,19 @@ source $(dirname ${BASH_SOURCE})/common.sh
20
20
21
21
header_text " running go test"
22
22
23
- go test -race ${MOD_OPT} ./...
23
+ # On MacOS there is a strange race condition
24
+ # between port allocation of envtest suites when go test
25
+ # runs all the tests in parallel without any limits (spins up around 10+ environments).
26
+ #
27
+ # To avoid flakes, set we're setting the go-test parallel flag to
28
+ # to limit the number of parallel executions.
29
+ #
30
+ # TODO(community): Investigate this behavior further.
31
+ if [[ " ${OSTYPE} " == " darwin" * ]]; then
32
+ P_FLAG=" -p=1"
33
+ fi
34
+
35
+ go test -race ${P_FLAG} ${MOD_OPT} ./...
24
36
25
37
if [[ -n ${ARTIFACTS:- } ]]; then
26
38
if grep -Rin ' <failure type="Failure">' ${ARTIFACTS} /* ; then exit 1; fi
You can’t perform that action at this time.
0 commit comments