Skip to content

Commit c1930cd

Browse files
committed
fix(ci): serialize race test packages
1 parent bf67306 commit c1930cd

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎Makefile‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ GOTESTSUM ?= $(shell command -v gotestsum 2>/dev/null || printf '%s/bin/gotestsu
1717
# use more than the historical four-test cap.
1818
TEST_PARALLELISM ?= 8
1919
TEST_PACKAGE_PARALLELISM ?= 8
20+
RACE_TEST_PACKAGE_PARALLELISM ?= 1
2021
RACE_TEST_PARALLELISM ?= 4
2122
INTEGRATION_PARALLELISM ?= 4
2223
GOTESTSUM_FLAGS ?= --rerun-fails=2 --rerun-fails-max-failures=5
@@ -78,14 +79,14 @@ test-uncached:
7879
$(GO) test -short -p=$(TEST_PACKAGE_PARALLELISM) -parallel=$(TEST_PARALLELISM) -count=1 -timeout 120s ./...
7980

8081
test-race:
81-
# Keep package-level overlap for cross-package race coverage while bounding
82-
# in-process test concurrency for the CPU-heavy SQLite tests.
83-
$(GO) test -short -race -p=4 -parallel=$(RACE_TEST_PARALLELISM) -timeout 600s ./internal/app ./internal/corpus ./internal/mcpserver ./internal/workspace
82+
# Race tests run each package in a separate process, so package overlap adds
83+
# CPU contention without extending race coverage across package boundaries.
84+
$(GO) test -short -race -p=$(RACE_TEST_PACKAGE_PARALLELISM) -parallel=$(RACE_TEST_PARALLELISM) -timeout 600s ./internal/app ./internal/corpus ./internal/mcpserver ./internal/workspace
8485

8586
test-race-full:
86-
# Keep package-level overlap for cross-package race coverage while bounding
87-
# in-process test concurrency for the CPU-heavy SQLite tests.
88-
$(GO) test -race -p=4 -parallel=$(RACE_TEST_PARALLELISM) -count=1 -timeout 900s ./...
87+
# Keep the same package isolation for the full race suite; callers can raise
88+
# package concurrency explicitly on hosts with enough CPU and memory.
89+
$(GO) test -race -p=$(RACE_TEST_PACKAGE_PARALLELISM) -parallel=$(RACE_TEST_PARALLELISM) -count=1 -timeout 900s ./...
8990

9091
test-verbose:
9192
$(GO) test -short -v -p=$(TEST_PACKAGE_PARALLELISM) -parallel=$(TEST_PARALLELISM) -timeout 120s ./...

0 commit comments

Comments
 (0)