Skip to content

ci: give the race detection job a workable timeout - #111

Merged
kirollosnct merged 1 commit into
enbility:devfrom
andig:fix/race-job-timeout
Sep 1, 2026
Merged

ci: give the race detection job a workable timeout#111
kirollosnct merged 1 commit into
enbility:devfrom
andig:fix/race-job-timeout

Conversation

@andig

@andig andig commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

go test -race -timeout=90s -count=3 ./ship ./hub gives each test binary a 90s budget. ./hub needs ~30s per -race run, so -count=3 lands at ~88s locally — inside the budget, with no headroom at all:

ok  github.com/enbility/ship-go/ship  29.031s
ok  github.com/enbility/ship-go/hub   88.360s

On a GitHub runner it tips over and the job fails with panic: test timed out after 1m30s. The dump reads like a deadlock, but the goroutines it names are ordinary: the running tests: header shows only TestHubConnectionsServerSuite (2s in), and the two live goroutines are a time.Sleep inside the test and the 500ms delayed-callback goroutine from HandleShipHandshakeStateUpdate. Nothing is stuck — the clock ran out mid-suite.

This is not tied to any one branch. The same job has been flapping on dev for weeks; run 33413520498 (PR #109, an mdns-only change) is just the latest to hit it.

Change

Raise the timeout on that one step to 300s. Still well inside the job's timeout-minutes: 15. The other -timeout=90s steps in the file are -count=1 or -run-filtered subsets and have plenty of margin.

Not addressed here: ./hub spending ~13s of its 30s in TestHandleShipHandshakeStateUpdateTestSuite, where ~25 tests each wait out the hardcoded 500ms delay in hub_shipconnection.go. Making that delay injectable would cut the runtime by a third — worth its own PR.

🤖 Generated with Claude Code

`go test -race -timeout=90s -count=3 ./ship ./hub` gives each test binary a
90s budget. ./hub needs ~30s per -race run, so -count=3 lands at ~88s
locally — inside the budget, but with no headroom at all. On a GitHub runner
it tips over and the job fails with `panic: test timed out after 1m30s`,
which reads like a deadlock but is only the clock running out mid-suite.

The failure is not tied to any one branch: the same job has been flapping on
dev for weeks. Raise the timeout to 300s, which is still well inside the
job's 15 minute limit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.092% (+0.03%) from 93.061% — andig:fix/race-job-timeout into enbility:dev

@kirollosnct

Copy link
Copy Markdown
Member

Thank you!

@kirollosnct
kirollosnct merged commit 8f087cc into enbility:dev Sep 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants