diff --git a/cloud/tasks/runner_test.go b/cloud/tasks/runner_test.go index 72f0adbe27b..2e6bc2e9a9b 100644 --- a/cloud/tasks/runner_test.go +++ b/cloud/tasks/runner_test.go @@ -1261,8 +1261,7 @@ func TestTryExecutingTask(t *testing.T) { runner.On("lockTask", ctx, taskInfo).Return(state, nil) task.On("Load", state.Request, state.State).Return(nil) taskStorage.On("UpdateTask", mock.Anything, mock.MatchedBy(matchesState(t, state))).Return(state, nil).Maybe() - execCtx := newExecutionContext(task, taskStorage, state, time.Hour, 2) - runnerMetrics.On("OnExecutionStarted", execCtx) + runnerMetrics.On("OnExecutionStarted", mock.Anything) runner.On("executeTask", mock.Anything, mock.Anything, task) runnerMetrics.On("OnExecutionStopped") @@ -1317,8 +1316,7 @@ func TestTryExecutingTaskFailToPing(t *testing.T) { updateTaskErr, ).Once() - execCtx := newExecutionContext(task, taskStorage, state, time.Hour, 2) - runnerMetrics.On("OnExecutionStarted", execCtx) + runnerMetrics.On("OnExecutionStarted", mock.Anything) runner.On("executeTask", mock.Anything, mock.Anything, task).Run(func(args mock.Arguments) { // Wait for pingPeriod, so that the first ping has had a chance to run. // TODO: This is bad.