diff --git a/pkg/controller/handler_test.go b/pkg/controller/handler_test.go index da0e2422c..e957aeb51 100644 --- a/pkg/controller/handler_test.go +++ b/pkg/controller/handler_test.go @@ -462,8 +462,7 @@ func TestPropeller_Handle(t *testing.T) { assert.Equal(t, 0, len(r.Finalizers)) assert.True(t, HasCompletedLabel(r)) }) - - t.Run("continueOnExecutionNotFoundError", func(t *testing.T) { + t.Run("failOnExecutionNotFoundError", func(t *testing.T) { assert.NoError(t, s.Create(ctx, &v1alpha1.FlyteWorkflow{ ObjectMeta: v1.ObjectMeta{ Name: name, @@ -485,36 +484,6 @@ func TestPropeller_Handle(t *testing.T) { Message: "The execution that the event belongs to does not exist", }, "failed to transition phase") } - assert.Error(t, p.Handle(ctx, namespace, name)) - - r, err := s.Get(ctx, namespace, name) - assert.NoError(t, err) - assert.Equal(t, v1alpha1.WorkflowPhaseRunning, r.GetExecutionStatus().GetPhase()) - assert.Equal(t, 0, len(r.Finalizers)) - assert.False(t, HasCompletedLabel(r)) - }) - t.Run("failOnExecutionNotFoundError", func(t *testing.T) { - assert.NoError(t, s.Create(ctx, &v1alpha1.FlyteWorkflow{ - ObjectMeta: v1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - WorkflowSpec: &v1alpha1.WorkflowSpec{ - ID: "w1", - }, - Status: v1alpha1.WorkflowStatus{ - Phase: v1alpha1.WorkflowPhaseRunning, - FailedAttempts: 1, - }, - })) - exec.HandleAbortedCb = func(ctx context.Context, w *v1alpha1.FlyteWorkflow, maxRetries uint32) error { - return workflowErrors.Wrapf(workflowErrors.EventRecordingError, "", - &eventErrors.EventError{ - Code: eventErrors.ExecutionNotFound, - Cause: nil, - Message: "The execution that the event belongs to does not exist", - }, "failed to transition phase") - } assert.NoError(t, p.Handle(ctx, namespace, name)) r, err := s.Get(ctx, namespace, name)