uranusjr commented on code in PR #64109:
URL: https://github.com/apache/airflow/pull/64109#discussion_r3744840706
##########
airflow-core/tests/unit/jobs/test_scheduler_job.py:
##########
@@ -7129,25 +7234,11 @@ def _running_counts():
assert dag1_non_b_running == 1
assert dag1_b_running == 3
- # this should be 14 but it is not. why?
- # answer: because dag2 got starved out by dag1
- # if we run the scheduler again, dag2 should get queued
- assert total_running == 4
+ assert total_running == 14
assert session.scalar(select(func.count()).select_from(DagRun)) == 46
assert session.scalar(select(func.count()).where(DagRun.dag_id ==
dag1_dag_id)) == 36
- # run scheduler a second time
- self.job_runner._start_queued_dagruns(session)
- session.flush()
-
- dag1_non_b_running, dag1_b_running, total_running = _running_counts()
- assert dag1_non_b_running == 1
- assert dag1_b_running == 3
-
- # on the second try, dag 2's 10 runs now start running
- assert total_running == 14
-
assert session.scalar(select(func.count()).select_from(DagRun)) == 46
assert session.scalar(select(func.count()).where(DagRun.dag_id ==
dag1_dag_id)) == 36
Review Comment:
This last part now checks the same things twice since you removed the
modifications between them.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]