eladkal commented on code in PR #23079:
URL: https://github.com/apache/airflow/pull/23079#discussion_r1081025444


##########
tests/models/test_dag.py:
##########
@@ -2925,6 +2926,57 @@ def consumer(value):
     ]
 
 
[email protected]("run_id, execution_date", [(None, datetime_tz(2020, 
1, 1)), ('test-run-id', None)])
+def test_set_task_instance_state_failed_downstream(run_id, execution_date, 
session, dag_maker):
+    """Test that set_task_instance_state updates the TaskInstance state to 
failed but doesn't clear downstream
+    tasks since the state to be set is already failed."""
+
+    start_date = datetime_tz(2020, 1, 1)
+    with dag_maker("test_set_task_instance_state", start_date=start_date, 
session=session) as dag:
+        task_1 = DummyOperator(task_id="task_1")
+        task_2 = DummyOperator(task_id="task_2")
+        task_3 = DummyOperator(task_id="task_3")

Review Comment:
   ```suggestion
           task_1 = EmptyOperator(task_id="task_1")
           task_2 = EmptyOperator(task_id="task_2")
           task_3 = EmptyOperator(task_id="task_3")
   ```



##########
tests/models/test_dag.py:
##########
@@ -56,6 +56,7 @@
 from airflow.models.param import DagParam, Param, ParamsDict
 from airflow.models.serialized_dag import SerializedDagModel
 from airflow.operators.bash import BashOperator
+from airflow.operators.dummy import DummyOperator

Review Comment:
   We have `EmptyOperator`



-- 
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