This is an automated email from the ASF dual-hosted git repository.
potiuk 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 653ff1c5ff Increase timeout for flaky
Test_BranchPythonDecoratedOperator test (#35511)
653ff1c5ff is described below
commit 653ff1c5ff6519b98faa30022bd961e6825c8d75
Author: Jarek Potiuk <[email protected]>
AuthorDate: Tue Nov 7 19:44:06 2023 +0100
Increase timeout for flaky Test_BranchPythonDecoratedOperator test (#35511)
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 8bbec6076b..0d7d79d51e 100644
--- a/tests/decorators/test_branch_python.py
+++ b/tests/decorators/test_branch_python.py
@@ -26,6 +26,10 @@ pytestmark = pytest.mark.db_test
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