milton0825 commented on a change in pull request #5128: [AIRFLOW-4307] Backfill
respects concurrency limit
URL: https://github.com/apache/airflow/pull/5128#discussion_r277119194
##########
File path: tests/test_jobs.py
##########
@@ -308,6 +308,37 @@ def test_backfill_conf(self):
self.assertEqual(conf, dr[0].conf)
+ def test_backfill_respect_concurrency_limit(self):
+
+ dag = self._get_dummy_dag('test_backfill_respect_concurrency_limit')
+ dag.concurrency = 2
+
+ executor = TestExecutor(do_update=True)
+
+ job = BackfillJob(
+ dag=dag,
+ executor=executor,
+ start_date=DEFAULT_DATE,
+ end_date=DEFAULT_DATE + datetime.timedelta(days=7),
+ )
+
+ job.run()
+
+ self.assertTrue(0 < len(executor.history))
+
+ concurrency_limit_reached_at_least_once = False
+
+ running_tis_total = 0
Review comment:
Agree that the name should be more descriptive. Fixed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services