Taragolis commented on PR #38219:
URL: https://github.com/apache/airflow/pull/38219#issuecomment-2002384363
Interesting finding about side effects in tests, which reproduced into the
current main
If run tests over `tests/www/test_app.py` module more than once some of them
will fail, if execute entire `tests/www/`then all tests are pass.
```console
root@bcd8fa28cc44:/opt/airflow# pytest tests/www/test_app.py
...
============================================================================
18 passed, 3 warnings in 10.21s
============================================================================
root@bcd8fa28cc44:/opt/airflow# pytest tests/www/test_app.py
...
FAILED tests/www/test_app.py::TestApp::test_should_respect_proxy_fix -
Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_base_url_ignore_proxy_headers
- Exception: Auth Manager has not been initialized yet. The
`init_auth_manager` method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_base_url_when_proxy_fix_and_base_url_is_set_up_but_headers_missing
- Exception: Auth Manager has not been initialized yet. The
`init_auth_manager` method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_base_url_and_proxy_when_proxy_fix_and_base_url_is_set_up
- Exception: Auth Manager has not been initialized yet. The
`init_auth_manager` method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_set_permanent_session_timeout -
Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_correct_default_is_set_for_cookie_samesite
- Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[sha512]
- Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[sha384]
- Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[sha256]
- Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[sha224]
- Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[sha1] -
Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[md5] -
Exception: Auth Manager has not been initialized yet. The `init_auth_manager`
method needs to be called first.
FAILED
tests/www/test_app.py::TestApp::test_should_respect_caching_hash_method[default]
- Exception: Auth Manager has not been initialized yet. The
`init_auth_manager` method needs to be called first.
=============================================================================
13 failed, 4 passed in 7.10s
==============================================================================
root@bcd8fa28cc44:/opt/airflow# pytest tests/www/
tests/www/test_app.py::TestApp::test_should_respect_proxy_fix PASSED
[ 0%]
tests/www/test_app.py::TestApp::test_should_respect_base_url_ignore_proxy_headers
PASSED
[ 0%]
tests/www/test_app.py::TestApp::test_base_url_contains_trailing_slash PASSED
[ 0%]
tests/www/test_app.py::TestApp::test_should_respect_base_url_when_proxy_fix_and_base_url_is_set_up_but_headers_missing
PASSED [ 0%]
tests/www/test_app.py::TestApp::test_should_respect_base_url_and_proxy_when_proxy_fix_and_base_url_is_set_up
PASSED [ 0%]
...
==================================================================== 622
passed, 1167 warnings in 224.98s (0:03:44)
=====================================================================
```
In both cases `tests/www/test_app.py` executed first so my suspicious about
tests collections
--
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]