kzosabe commented on code in PR #38631:
URL: https://github.com/apache/airflow/pull/38631#discussion_r1545086130


##########
tests/models/test_taskinstance.py:
##########
@@ -1511,6 +1511,24 @@ def test_respects_prev_dagrun_dep(self, 
create_task_instance):
         ):
             assert ti.are_dependencies_met()
 
+    @pytest.mark.parametrize(
+        "before_state, after_state, expected_has_start_date",
+        [
+            (TaskInstanceState.SCHEDULED, TaskInstanceState.QUEUED, False),
+            (TaskInstanceState.SCHEDULED, TaskInstanceState.RUNNING, True),
+            (TaskInstanceState.SCHEDULED, TaskInstanceState.SUCCESS, True),

Review Comment:
   We can also add test cases like below, but currently they are not passed.
   If we get concensus about state matrix in 
https://github.com/apache/airflow/issues/38632 , I can try to resolve it. 
   ```python
   (TaskInstanceState.RUNNING, TaskInstanceState.SCHEDULED, False),
   (TaskInstanceState.RUNNING, TaskInstanceState.QUEUED, False),
   (TaskInstanceState.RUNNING, TaskInstanceState.SUCCESS, True),
   ```



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