houqp commented on code in PR #22701:
URL: https://github.com/apache/airflow/pull/22701#discussion_r846377948


##########
tests/jobs/test_backfill_job.py:
##########
@@ -608,11 +609,44 @@ def test_backfill_override_conf(self, dag_maker):
             dr = wrapped_task_instances_for_dag_run.call_args_list[0][0][0]
             assert dr.conf == {"a": 1}
 
+    def test_backfill_skip_active_scheduled_dagrun(self, dag_maker):
+        dag = self._get_dummy_dag(
+            dag_maker,
+            dag_id="test_backfill_skip_active_scheduled_dagrun",
+            task_id="test_backfill_skip_active_scheduled_dagrun-1",
+        )
+        dag_maker.create_dagrun(
+            run_type=DagRunType.SCHEDULED,
+            state=State.RUNNING,
+        )
+
+        executor = MockExecutor()
+
+        job = BackfillJob(
+            dag=dag,
+            executor=executor,
+            start_date=DEFAULT_DATE,
+            end_date=DEFAULT_DATE + datetime.timedelta(days=2),
+        )
+        with patch.object(job.log, 'error') as mock_error:

Review Comment:
   TIL, thanks for the tip!



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