You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/02/13 11:17:59 UTC
(airflow) branch main updated: Rmeove flakiness introduced by cleanup in configuration test (#37375)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new cbc9af09dd Rmeove flakiness introduced by cleanup in configuration test (#37375)
cbc9af09dd is described below
commit cbc9af09dd24d03ff849f116ffbe7bf231e48712
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Feb 13 12:17:51 2024 +0100
Rmeove flakiness introduced by cleanup in configuration test (#37375)
The changes in #37320 introduced flakiness while removing side-effect
of configuration test. Cleanup of ProvidersManager might
interfere with other tests using it at the same time. This caused
some Non-DB test failures with missing keys in ProvidersManager.
The fix is to mark the configuration test as DB-test - then it
will never be run by NonDB xdist and it will always run
sequentially to other tests (and still it will not
introduce side-effect as cleanup will always be done between tests.
---
tests/core/test_configuration.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/core/test_configuration.py b/tests/core/test_configuration.py
index 9a69a1b28e..9dde9dc592 100644
--- a/tests/core/test_configuration.py
+++ b/tests/core/test_configuration.py
@@ -1654,6 +1654,9 @@ def test_error_when_contributing_to_existing_section():
assert conf.get("celery", "celery_app_name") == "test"
+# Technically it's not a DB test, but we want to make sure it's not interfering with xdist non-db tests
+# Because the `_cleanup` method might cause side-effect for parallel-run tests
+@pytest.mark.db_test
class TestWriteDefaultAirflowConfigurationIfNeeded:
@pytest.fixture(autouse=True)
def setup_test_cases(self, tmp_path_factory):