You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/04/19 18:10:25 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #5128: [AIRFLOW-4307] Backfill respects concurrency limit

potiuk commented on a change in pull request #5128: [AIRFLOW-4307] Backfill respects concurrency limit
URL: https://github.com/apache/airflow/pull/5128#discussion_r277049634
 
 

 ##########
 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:
   tis ? I initially could not figure out what it stands for and I am quite sure other people will also scratch their heads. Could you please provide a more descriptive name - maybe task_instances ?
   
    I know it was there in the pool limit testing, but maybe we can correct it there as well in this PR.
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services