Commit e371c31e authored by Shinya Maeda's avatar Shinya Maeda

Rename to job execution timeout

parent 7fa83d68
......@@ -268,7 +268,7 @@ func (b *Build) handleError(err error) error {
case context.DeadlineExceeded:
b.CurrentState = BuildRunRuntimeTimedout
return &BuildError{Inner: fmt.Errorf("execution took longer than %v seconds", b.GetBuildTimeout()), FailureReason: RunnerExecutionTimeout}
return &BuildError{Inner: fmt.Errorf("execution took longer than %v seconds", b.GetBuildTimeout()), FailureReason: JobExecutionTimeout}
default:
b.CurrentState = BuildRunRuntimeFinished
......
......@@ -200,7 +200,7 @@ func TestPrepareFailureOnExecutionTimeout(t *testing.T) {
// Prepare plan
e.On("Prepare", mock.Anything, mock.Anything, mock.Anything).
Return(&BuildError{FailureReason: RunnerExecutionTimeout}).Times(1)
Return(&BuildError{FailureReason: JobExecutionTimeout}).Times(1)
e.On("Cleanup").Return().Times(1)
RegisterExecutor("build-run-prepare-failure-on-execution-timeout", &p)
......@@ -219,7 +219,7 @@ func TestPrepareFailureOnExecutionTimeout(t *testing.T) {
err = build.Run(&Config{}, &Trace{Writer: os.Stdout})
assert.IsType(t, err, &BuildError{})
if buildError, ok := err.(*BuildError); ok {
assert.Equal(t, buildError.FailureReason, RunnerExecutionTimeout)
assert.Equal(t, buildError.FailureReason, JobExecutionTimeout)
}
}
......
......@@ -22,10 +22,10 @@ const (
)
const (
NoneFailure JobFailureReason = ""
ScriptFailure JobFailureReason = "script_failure"
RunnerSystemFailure JobFailureReason = "runner_system_failure"
RunnerExecutionTimeout JobFailureReason = "runner_execution_timeout"
NoneFailure JobFailureReason = ""
ScriptFailure JobFailureReason = "script_failure"
RunnerSystemFailure JobFailureReason = "runner_system_failure"
JobExecutionTimeout JobFailureReason = "job_execution_timeout"
)
const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment