Skip to content

Commit

Permalink
Avoid concurrent package tests (#3073)
Browse files Browse the repository at this point in the history
See open-telemetry/opentelemetry-collector#3064 (comment) for the reasons for this change. This enforces that package tests don't run concurrently: when they run concurrently it is possible to clash on machine-wide resources like ports.

I tried a few variants to see the effects on CI: CircleCI did get noticeable slow GH Actions too but not as much. While it feels "wasteful" the added time for tests that do not use machine-wide resources, avoiding concurrent run of package tests is a more reliable way to run the tests and avoid test bugs like #3064.

The current choice was the fastest on my machine on runs with a clean test cache.

Fixes #3064
  • Loading branch information
pjanotti committed May 7, 2021
1 parent 3418540 commit 100eb68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ALL_PKGS is the list of all packages where ALL_SRC files reside.
ALL_PKGS := $(sort $(shell go list ./...))

GOTEST_OPT?= -v -race -timeout 180s
# Use a single process (-p 1) on go test to avoid tests clashing on machine
# wide resources, e.g. ports.
GOTEST_OPT?= -v -p 1 -race -timeout 180s
GOTEST=go test
LINT=golangci-lint
IMPI=impi
Expand Down

0 comments on commit 100eb68

Please sign in to comment.