From 364a27c3916ffc0e009bc6ebf6076189f81832bc Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 7 Nov 2023 18:46:51 +0100 Subject: [PATCH] Increase timeout for flaky Test_BranchPythonDecoratedOperator test Similar to #35473 - this test sometimes (very rarely) exceeds the default 60 seconds timeout when run in Paralllel test environment where we have multiple containers and multiple databases and multiple parallel tests runnign at the same time on single virtual machine (in order to maximise the gains from parallelism). This test sometimes fails with **just** above 60 seconds, so following the 3x rule explained in the long description of reasoning why we are doing it https://github.com/apache/airflow/pull/35473#issuecomment-1795408176 --- tests/decorators/test_branch_python.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/decorators/test_branch_python.py b/tests/decorators/test_branch_python.py index 8bbec6076b8ef..0d7d79d51e491 100644 --- a/tests/decorators/test_branch_python.py +++ b/tests/decorators/test_branch_python.py @@ -26,6 +26,10 @@ class Test_BranchPythonDecoratedOperator: + # when run in "Parallel" test run environment, sometimes this test runs for a long time + # because creating virtualenv and starting new Python interpreter creates a lot of IO/contention + # possibilities. So we are increasing the timeout for this test to 3x of the default timeout + @pytest.mark.execution_timeout(180) @pytest.mark.parametrize("branch_task_name", ["task_1", "task_2"]) def test_branch_one(self, dag_maker, branch_task_name): @task