From 13e87a18c86d2db227e2555aa677bae95d2813db Mon Sep 17 00:00:00 2001 From: Sanaei Date: Thu, 3 Sep 2026 21:57:38 +0200 Subject: [PATCH] chore(ci): give the race job a 25m test timeout The race job failed with "panic: test timed out after 10m0s" in internal/web/service (FAIL at 600.106s) while every other package passed and the non-race go-test job ran the same package in 57s. Nothing hung. The race detector costs this repo ~8.5-10x (internal/database 8.4s -> 73s, internal/sub 17.8s -> 149s), and internal/web/service has 671 tests, ~40 of which each pay a full InitDB + AutoMigrate. That puts it right on go test's 10-minute default per-package timeout: the last four race jobs finished in 10m10s-10m28s before this one crossed the line. Pass -timeout 25m in ci.yml and `make race` so the largest package has real headroom while a genuine deadlock is still bounded. Verified locally: ok internal/web/service 265.425s, 658 tests, no data races. --- .github/workflows/ci.yml | 3 ++- Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f436d5053..64815e770 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,8 @@ jobs: - name: Race + shuffle run: | go list ./... | grep -v '/frontend/node_modules/' > /tmp/go-packages.txt - go test -race -shuffle=on -count=1 $(cat /tmp/go-packages.txt) + # internal/web/service runs ~10x slower under -race and overruns the 10m default. + go test -race -shuffle=on -count=1 -timeout 25m $(cat /tmp/go-packages.txt) # Brief native-fuzz smoke on the security-/parser-critical decoders. Each runs the # generated corpus plus 30s of exploration; a crash here is a real input-handling bug. diff --git a/Makefile b/Makefile index c177f8412..8b36b610d 100644 --- a/Makefile +++ b/Makefile @@ -54,8 +54,9 @@ test-go: dist-stub ## Go tests (shuffle, no cache) go test -shuffle=on -count=1 $(GO_PKGS) .PHONY: race +# internal/web/service runs ~10x slower under -race and overruns go test's 10m default. race: dist-stub ## Go tests with the race detector (needs a C compiler) - go test -race -shuffle=on -count=1 $(GO_PKGS) + go test -race -shuffle=on -count=1 -timeout 25m $(GO_PKGS) .PHONY: test-fe test-fe: ## Frontend tests (vitest)