### 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
session = settings.Session()
        slots = 2
        pool = Pool(
            pool='pool_with_two_slots',
            slots=slots,
        )
        session.add(pool)
        session.commit()
        dag = self._get_dummy_dag(
            dag_maker,
            dag_id='test_backfill_respect_pool_limit',
            pool=pool.pool,
        )
        dag_maker.create_dagrun()
        executor = MockExecutor()
        job = BackfillJob(
            dag=dag,
            executor=executor,