phanikumv commented on code in PR #68554:
URL: https://github.com/apache/airflow/pull/68554#discussion_r3411530577


##########
go-sdk/pkg/execution/integration_test.go:
##########
@@ -106,6 +106,34 @@ func TestTaskRunnerFailure(t *testing.T) {
        assert.Equal(t, "failed", result["state"])
 }
 
+func TestTaskRunnerRetry(t *testing.T) {
+       bundle := buildBundle(t, func(r bundlev1.Registry) {
+               r.AddDag("test_dag").AddTask(failingTask)
+       })
+
+       details := &StartupDetails{
+               TI: TaskInstanceInfo{
+                       ID:       "550e8400-e29b-41d4-a716-446655440000",
+                       DagID:    "test_dag",
+                       TaskID:   "failingTask",
+                       RunID:    "run1",
+                       MapIndex: -1,
+               },
+               BundleInfo: BundleInfoMsg{Name: "test", Version: "1.0"},
+               TIContext: TIRunContext{
+                       ShouldRetry: true,
+                       MaxTries:    3,
+               },
+       }
+
+       logger := slog.New(slog.NewTextHandler(io.Discard, nil))
+       comm := NewCoordinatorComm(bytes.NewReader(nil), io.Discard, logger)
+
+       result := RunTask(context.Background(), bundle, details, comm, logger)
+       assert.Equal(t, "RetryTask", result["type"])
+       assert.Equal(t, "task failed intentionally", result["reason"])

Review Comment:
   ```suggestion
        assert.Equal(t, "task failed intentionally", result["retry_reason"])
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to