From 34a7033413ad6230d1c950c9e49e73951f60eeb1 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung <uranusjr@gmail.com> Date: Wed, 8 Jan 2025 13:54:49 +0800 Subject: [PATCH] Properly clean up after tests --- providers/tests/openlineage/plugins/test_execution.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/providers/tests/openlineage/plugins/test_execution.py b/providers/tests/openlineage/plugins/test_execution.py index 169203b3e2131..6eb84a5d4012d 100644 --- a/providers/tests/openlineage/plugins/test_execution.py +++ b/providers/tests/openlineage/plugins/test_execution.py @@ -37,6 +37,7 @@ from airflow.utils.types import DagRunType from tests_common.test_utils.config import conf_vars +from tests_common.test_utils.db import clear_db_runs from tests_common.test_utils.version_compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS if AIRFLOW_V_3_0_PLUS: @@ -73,6 +74,9 @@ def has_value_in_events(events, chain, value): @pytest.mark.skipif(not AIRFLOW_V_2_10_PLUS, reason="Test requires Airflow 2.10+") @pytest.mark.usefixtures("reset_logging_config") class TestOpenLineageExecution: + def teardown_method(self): + clear_db_runs() + @pytest.fixture(autouse=True) def clean_listener_manager(self): get_listener_manager().clear()