### Body

Add unit test for changes in https://github.com/apache/airflow/pull/17305

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
tests/jobs/test_backfill_job.py
with dag_maker(
            dag_id='test_intermittent_failure_job',
            schedule_interval="@daily",
            default_args={
                'retries': 2,
                'retry_delay': datetime.timedelta(seconds=0),
            },
        ) as dag:
            task1 = DummyOperator(task_id="task1")
        dag_maker.create_dagrun()
        executor = MockExecutor(parallelism=16)
        executor.mock_task_results[
            TaskInstanceKey(dag.dag_id, task1.task_id, DEFAULT_DATE, try_number=1)
        ] = State.UP_FOR_RETRY
        executor.mock_task_results[
            TaskInstanceKey(dag.dag_id, task1.task_id, DEFAULT_DATE, try_number=2)
        ] = State.UP_FOR_RETRY
        job = BackfillJob(
            dag=dag,
            executor=executor,
            start_date=DEFAULT_DATE,
            end_date=DEFAULT_DATE + datetime.timedelta(days=2),
        )
        job.run()
    def test_backfill_retry_always_failed_task(self, dag_maker):