Skip to content

Core tests fail when run separately #37466

@drajguru

Description

@drajguru

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

test_sqlite_relative_path() in test_settings.py seemingly puts the session into a state that prevents subsequent test modules from passing. I think during this test the session is re-initialized and this interferes other test modules due to it being a global object.

What you think should happen instead?

The test should mock out the session, engine... objects to avoid mutating the global state.

How to reproduce

breeze testing tests --test-type Core

! _pytest.outcomes.Exit: Unable clear test DB, got error sqlalchemy.exc.OperationalE
[SQL: DELETE FROM job]
(Background on this error at: https://sqlalche.me/e/14/e3q8) !
============ 193 passed, 4 skipped, 5 warnings in 65.27s (0:01:05) =============

Operating System

ubuntu 22.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

Using breeze

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions