This is an automated email from the ASF dual-hosted git repository.
vincbeck 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 fdb7265ad1e Fix asset manager team-metric test failing on rerun
(#68891)
fdb7265ad1e is described below
commit fdb7265ad1e5e4d9db29bd421b181b6e0b9a256a
Author: PoAn Yang <[email protected]>
AuthorDate: Wed Jun 24 00:13:31 2026 +0900
Fix asset manager team-metric test failing on rerun (#68891)
test_asset_updates_respects_team_name doesn't clear teams, so a second run
against the same DB hits the team.name primary key.
---
airflow-core/tests/unit/assets/test_manager.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/airflow-core/tests/unit/assets/test_manager.py
b/airflow-core/tests/unit/assets/test_manager.py
index b8d47fb4d3c..54ddd66a2d4 100644
--- a/airflow-core/tests/unit/assets/test_manager.py
+++ b/airflow-core/tests/unit/assets/test_manager.py
@@ -75,6 +75,15 @@ def clear_assets():
clear_db_assets()
[email protected]
+def clear_teams():
+ from tests_common.test_utils.db import clear_db_teams
+
+ clear_db_teams()
+ yield
+ clear_db_teams()
+
+
@pytest.fixture
def mock_task_instance():
# TODO: Fixme - some mock_task_instance is needed here
@@ -839,6 +848,7 @@ def _make_asset_model(
class TestAssetMetricsTeamName:
+ @pytest.mark.usefixtures("clear_teams")
@pytest.mark.parametrize(
("multi_team", "expect_team_tag"),
[