milton0825 commented on a change in pull request #5303: [AIRFLOW-4535] Break
jobs.py into multiple files
URL: https://github.com/apache/airflow/pull/5303#discussion_r285389595
##########
File path: tests/www/api/experimental/test_dag_runs_endpoint.py
##########
@@ -35,6 +35,9 @@ def setUpClass(cls):
session.query(DagRun).delete()
session.commit()
session.close()
+ dagbag = DagBag(include_examples=True)
Review comment:
Actually there is a need for this. In `test_jobs.py`, we clear the `dag`
table before the tests, which includes the example dags used by other tests
such as `test_dag_runs_endpoint.py`. In the past `test_jobs.py` runs after all
other tests so everything looks fine.
However, after this change, the test execution order also changes and it
expose the race condition here. So I added this change to reload the `dag`
table in tests that requires example dags in the `dag` table.
----------------------------------------------------------------
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