### 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
"""Try to reset when we specify a dagrun and ensure nothing else is."""
        dag_id = 'test_reset_orphaned_tasks_specified_dagrun'
        task_id = dag_id + '_task'
        with dag_maker(
            dag_id=dag_id,
            start_date=DEFAULT_DATE,
            schedule_interval='@daily',
            session=session,
        ) as dag:
            DummyOperator(task_id=task_id, dag=dag)
        job = BackfillJob(dag=dag)
        
        dr1 = dag_maker.create_dagrun(state=State.SUCCESS)
        dr2 = dag.create_dagrun(run_id='test2', state=State.RUNNING, session=session)
        ti1 = dr1.get_task_instances(session=session)[0]
        ti2 = dr2.get_task_instances(session=session)[0]
        ti1.state = State.SCHEDULED
        ti2.state = State.SCHEDULED
        session.merge(ti1)
        session.merge(ti2)
        session.merge(dr1)
        session.merge(dr2)
        session.flush()
        num_reset_tis = job.reset_state_for_orphaned_tasks(filter_by_dag_run=dr2, session=session)
        assert 1 == num_reset_tis
        ti1.refresh_from_db(session=session)
        ti2.refresh_from_db(session=session)
        assert State.SCHEDULED == ti1.state
        assert State.NONE == ti2.state
    def test_job_id_is_assigned_to_dag_run(self, dag_maker):