-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Speedup test collection for tests/www
#46812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I must mention that I am quite confused by In its initial configuration this test depends on parametrized parameters call order cause otherwise |
1fe6faa to
1e0863e
Compare
1e0863e to
5f76166
Compare
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE!
Not 100% sure either. But since |
That's awesome! The test collection there is one of the longest. I was researching what's going on with it but decided to postpone a deep investigation because of all 3.0 changes and to fix only this "low-hanging fruit." Even the first phase of old provider code cleanup made a huge difference. Thank you! |
* Do not run initial_db_init on module top level * Set default in tests * Move google provider `test_dataform.py` from tests/utils/ to provider/google/tests/unit/... * Fix test depending on parametrized params execution order
* Do not run initial_db_init on module top level * Set default in tests * Move google provider `test_dataform.py` from tests/utils/ to provider/google/tests/unit/... * Fix test depending on parametrized params execution order
initial_db_initcall from top level oftests/www/views/test_views_rendered.py.tests/utils/test_dataform.pytoproviders/google/tests/unit/google/cloud/utils/test_dataform.pyThis call significantly slows tests collection.
I was able to drop arbitrary collection time with
--collect-onlyfor www tests from 20 to 5-6 seconds. And the wholetestscollection from 41-42 to 32-33 seconds. Fast test collection allows various opportunities like dependencies smoke-tests and improves developers' experience.This call is already provided by
tests_common.pytest_plugin, so it should not affect the tests.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.