mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-04 09:27:15 +00:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user