From 48b619078d0f7ccf4ed7be79d79618f3bf11e12f Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sat, 8 Jun 2024 19:45:14 +0200 Subject: [PATCH] Mark two tests as (trigger and deps) as flaky (#40144) Those two tests are failing sometimes when run in parallel setting. Not very frequently but frequently enough to be annoying, Seems that they are really re-runnable and apparently there are some racy behaviours triggering it, so marking them as flaky should help. --- tests/ti_deps/deps/test_trigger_rule_dep.py | 1 + tests/triggers/test_external_task.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/ti_deps/deps/test_trigger_rule_dep.py b/tests/ti_deps/deps/test_trigger_rule_dep.py index 73679d6391253..90b17ac4303d6 100644 --- a/tests/ti_deps/deps/test_trigger_rule_dep.py +++ b/tests/ti_deps/deps/test_trigger_rule_dep.py @@ -1135,6 +1135,7 @@ def test_mapped_task_upstream_removed_with_all_failed_trigger_rules( _test_trigger_rule(ti=ti, session=session, flag_upstream_failed=flag_upstream_failed) + @pytest.mark.flaky(reruns=5) @pytest.mark.parametrize( "trigger_rule", [TriggerRule.NONE_FAILED, TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS] ) diff --git a/tests/triggers/test_external_task.py b/tests/triggers/test_external_task.py index 7ec1b4c2d4539..269e53f4ef6c8 100644 --- a/tests/triggers/test_external_task.py +++ b/tests/triggers/test_external_task.py @@ -74,6 +74,7 @@ async def test_task_workflow_trigger_success(self, mock_get_count): with pytest.raises(StopAsyncIteration): await gen.__anext__() + @pytest.mark.flaky(reruns=5) @mock.patch("airflow.triggers.external_task._get_count") @pytest.mark.asyncio async def test_task_workflow_trigger_failed(self, mock_get_count):