Matched signals
- Test timed out
- exceeded timeout
- Timeout - Async callback was not invoked within
- test timeout of
- jest timeout
- go test -timeout
- test exceeded
- async test timed out
Test suite or individual test timed out
What this failure means
A test (or the entire test suite) did not complete within the configured timeout period. The test runner killed the pending test and marked it as failed.
Symptoms
Faultline looks for one or more of these log fragments:
Test timed out
exceeded timeout
Timeout - Async callback was not invoked within
test timeout of
jest timeout
go test -timeout
test exceeded
async test timed out
Diagnosis
A test (or the entire test suite) did not complete within the configured timeout period. The test runner killed the pending test and marked it as failed.
Fix steps
-
Identify the test name in the timeout message and run it in isolation with verbose output to see where it stalled.
-
Check for missing
await, unresolved promises, or callbacks that are never called — these prevent async runners from completing the test. -
For Go: get a goroutine dump to see which goroutine is blocked:
GOTRACEBACK=all go test -timeout 60s -run TestName ./... # or send SIGQUIT to the running test process: kill -QUIT <pid> -
For Jest/Node: run with
--detectOpenHandlesto find resource leaks that prevent clean exit:jest --testNamePattern="failing test" --detectOpenHandles -
Verify that any external services or mocks the test uses are available and responding. Add a health-check before the test rather than letting it hang.
-
Increase the timeout as a diagnostic step only — if it then passes, the operation is genuinely slow and needs optimisation or mocking.
-
Replace real network or DB calls in unit tests with mocks to ensure the test cannot hang on external I/O.
Validation
- Run the specific test in isolation and confirm it completes within the normal time limit.
- Re-run the full suite and confirm no timeout errors remain.
Why it matters
Test timeouts occur when a test blocks waiting for an async operation that never resolves, a database or network call that hangs, a mock that is never triggered, or simply a test that is genuinely slow and needs a higher timeout.
Prevention
- Set explicit per-test and per-suite timeouts rather than relying on defaults.
- Mock all external I/O in unit tests so they cannot block on network.
- Monitor test execution time trend and alert when slow tests emerge.
- Capture stack traces, goroutine dumps, or runner diagnostics on timeout so recurring hangs are debuggable after the fact.
Try it locally
go test -timeout 60s -run TestName ./...
jest --testNamePattern="failing test" --detectOpenHandles
go test -timeout 60s -run TestName ./...
How Faultline detects it
Use faultline explain test-timeout to see the full playbook.
faultline analyze build.log
faultline explain test-timeout
Generated from playbooks/bundled/log/test/test-timeout.yaml. Do not edit directly.