Skip to content

Commit

Permalink
Rmeove flakiness introduced by cleanup in configuration test (#37375)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit cbc9af0)
  • Loading branch information
potiuk authored and ephraimbuddy committed Feb 20, 2024
1 parent da024aa commit 1d5f857
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/core/test_configuration.py
Expand Up @@ -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):
Expand Down

0 comments on commit 1d5f857

Please sign in to comment.