You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/28 06:30:31 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #17265: Use `dag_maker` fixture in test_scheduler_job.py

ephraimbuddy commented on a change in pull request #17265:
URL: https://github.com/apache/airflow/pull/17265#discussion_r678010789



##########
File path: tests/jobs/test_scheduler_job.py
##########
@@ -1242,12 +1165,12 @@ def test_execute_task_instances_unlimited(self):
         date = dag.start_date
         tis = []
         for _ in range(0, 20):
+            date = dag.following_schedule(date)
             dr = dag.create_dagrun(
                 run_type=DagRunType.SCHEDULED,
                 execution_date=date,
                 state=State.RUNNING,
             )
-            date = dag.following_schedule(date)

Review comment:
       Not really. What’s happening is that it’s now skipping creation of the first dagrun because the dag_maker fixture has created it. Without this, it’ll fail on integrity error while trying to create the same dagrun already created by fixture




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org