ferruzzi commented on code in PR #40285:
URL: https://github.com/apache/airflow/pull/40285#discussion_r1643477441


##########
tests/jobs/test_backfill_job.py:
##########
@@ -350,9 +377,8 @@ def 
test_backfill_respect_max_active_tis_per_dag_limit(self, mock_log, dag_maker
         )
         dag_maker.create_dagrun(state=None)
 
-        executor = MockExecutor()
-
-        job = Job(executor=executor)
+        job = Job()
+        executor = job.executor

Review Comment:
   Nit:  (Here and elsewhere) With the changes you made, it seems a bit 
unnecessary to set `executor = job.executor`.  Perhaps consider just inlining 
that.  You only use it twice in the test and it's not really clarifying or 
saving repetition much.



##########
tests/jobs/test_backfill_job.py:
##########
@@ -763,15 +778,13 @@ def test_backfill_skip_active_scheduled_dagrun(self, 
dag_maker, caplog):
         # since DAG backfill is skipped, task state should be none
         assert ti.state == State.NONE
 
-    def test_backfill_rerun_failed_tasks(self, dag_maker):
+    def test_backfill_rerun_failed_tasks(self, dag_maker, mock_executor):
         dag = self._get_dummy_dag(

Review Comment:
   I know this wasn't you, but pretty sure we have "dummy" on our list of words 
to avoid.  We should maybe update that method name at some point.  I thought we 
had a CI check for "unacceptable words"



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