grafana/k6 · warning
test execution wasn't paused
Error message
test execution wasn't paused
What it means
ExecutionState.Resume() swaps currentPauseTime back to 0 to end a pause; if the swapped value was already 0 the test was not paused, so Resume() has nothing to resume and returns this error. It is the counterpart guard to Pause()'s 'already paused' error.
Source
Thrown at lib/execution.go:425
if !atomic.CompareAndSwapInt64(es.currentPauseTime, 0, time.Now().UnixNano()) {
return errors.New("test execution was already paused")
}
es.resumeNotify = make(chan struct{})
return nil
}
// Resume unpauses the test execution. Unless the test wasn't
// yet started, it calculates the duration between now and
// the old currentPauseTime and adds it to
// Resume will emit an error if the test wasn't paused.
func (es *ExecutionState) Resume() error {
es.pauseStateLock.Lock()
defer es.pauseStateLock.Unlock()
currentPausedTime := atomic.SwapInt64(es.currentPauseTime, 0)
if currentPausedTime == 0 {
return errors.New("test execution wasn't paused")
}
// Check that it's not the pause before execution actually starts
if atomic.LoadInt64(es.startTime) != 0 {
es.totalPausedDuration += time.Duration(time.Now().UnixNano() - currentPausedTime)
}
close(es.resumeNotify)
return nil
}
// ResumeNotify returns a channel which will be closed (i.e. could
// be read from) as soon as the test execution is resumed.
//
// Since tests would likely be paused only rarely, unless you
// directly need to be notified via a channel that the test
// isn't paused or that it has resumed, it's probably a goodView on GitHub (pinned to 93accf6570)
Solutions
- Check GET /v1/status and only resume when paused:true
- Ensure exactly one resume follows each pause in automation scripts
- Treat 'wasn't paused' as benign in idempotent wrappers (ignore this specific error)
Example fix
# before k6 resume # test was never paused -> error # after k6 status | grep -q '"paused": true' && k6 resume || echo 'not paused, skipping'
Defensive patterns
Strategy: validation
Validate before calling
status=$(curl -s http://localhost:6565/v1/status) echo "$status" | grep -q '"paused": *true' && curl -sX POST http://localhost:6565/v1/resume || echo 'not paused, skipping resume'
Prevention
- Only resume when /v1/status reports paused:true
- Treat 'wasn\u2019t paused' as a benign no-op in wrappers
- Track pause state in the orchestrator instead of guessing
When it happens
Trigger: Calling POST /v1/resume on a running (never paused) test, or resuming twice after a single pause.
Common situations: Startup scripts that unconditionally resume 'just in case'; resuming after the pause already ended (double resume); orchestrators that lost track of the pause state.
Related errors
- test execution was already paused
- execution is already paused
- %s executor '%s' doesn't support pause and resume operations
- The REST API server is disabled, but this command needs to r
- getting scenario information outside of the VU context is no
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/44bcbf93f6ae3cac.
Report an issue: GitHub.