Skip to content

Commit 3f0e75e

Browse files
authored
Mark flaky airflowctl test (apache#51505)
* add devel-common into dev dependency group * add markers definition
1 parent d33e887 commit 3f0e75e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

airflow-ctl/pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ docs = [
113113
]
114114
dev = [
115115
"apache-airflow-ctl[dev]",
116+
"apache-airflow-devel-common",
116117
]
117118
codegen = [
118119
"datamodel-code-generator[http]==0.28.2",
@@ -156,7 +157,9 @@ addopts = [
156157
"--disable-warnings",
157158
"--asyncio-mode=strict",
158159
]
159-
160+
markers = [
161+
"flaky(reruns, reruns_delay): retry test on failure using pytest-rerunfailures"
162+
]
160163
norecursedirs = [
161164
".eggs",
162165
]

airflow-ctl/tests/airflow_ctl/ctl/commands/test_auth_command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from unittest import mock
2323
from unittest.mock import patch
2424

25+
import pytest
2526
from platformdirs import user_config_path
2627

2728
from airflowctl.api.client import ClientKind
@@ -39,6 +40,7 @@ class TestCliAuthCommands:
3940
@patch.dict(os.environ, {"AIRFLOW_CLI_TOKEN": "TEST_TOKEN"})
4041
@patch.dict(os.environ, {"AIRFLOW_CLI_ENVIRONMENT": "TEST_AUTH_LOGIN"})
4142
@patch("airflowctl.api.client.keyring")
43+
@pytest.mark.flaky(reruns=3, reruns_delay=10)
4244
def test_login(self, mock_keyring, api_client_maker):
4345
api_client = api_client_maker(
4446
path="/auth/token/cli",

0 commit comments

Comments
 (0)