This is an automated email from the ASF dual-hosted git repository.
amoghdesai 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 290f6320648 Increasing task timeout by 2 seconds for more resilient
runs (#50578)
290f6320648 is described below
commit 290f63206480cf06cae1fb4a3d52e22f528e14ea
Author: Amogh Desai <[email protected]>
AuthorDate: Wed May 14 20:20:05 2025 +0530
Increasing task timeout by 2 seconds for more resilient runs (#50578)
---
devel-common/src/tests_common/pytest_plugin.py | 3 +++
providers/http/tests/unit/http/sensors/test_http.py | 7 -------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/devel-common/src/tests_common/pytest_plugin.py
b/devel-common/src/tests_common/pytest_plugin.py
index 75f2899d4b2..f3052e5f935 100644
--- a/devel-common/src/tests_common/pytest_plugin.py
+++ b/devel-common/src/tests_common/pytest_plugin.py
@@ -1474,7 +1474,10 @@ class CreateTaskOfOperator(Protocol):
@pytest.fixture
def create_task_of_operator(dag_maker: DagMaker) -> CreateTaskOfOperator:
def _create_task_of_operator(operator_class, *, dag_id, session=None,
**operator_kwargs):
+ default_timeout = 7
with dag_maker(dag_id=dag_id, session=session):
+ if "timeout" not in operator_kwargs:
+ operator_kwargs["timeout"] = default_timeout
task = operator_class(**operator_kwargs)
return task
diff --git a/providers/http/tests/unit/http/sensors/test_http.py
b/providers/http/tests/unit/http/sensors/test_http.py
index 12254e1d697..15af8deb276 100644
--- a/providers/http/tests/unit/http/sensors/test_http.py
+++ b/providers/http/tests/unit/http/sensors/test_http.py
@@ -62,7 +62,6 @@ class TestHttpSensor:
endpoint="",
request_params={},
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
with pytest.raises(AirflowException, match="AirflowException raised
here!"):
@@ -90,7 +89,6 @@ class TestHttpSensor:
endpoint="",
request_params={},
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
assert task.execute(context={}) == "somedata"
@@ -120,7 +118,6 @@ class TestHttpSensor:
method="HEAD",
response_check=resp_check,
extra_options={"check_response": False},
- timeout=5,
poke_interval=1,
)
@@ -141,7 +138,6 @@ class TestHttpSensor:
request_params={},
method="HEAD",
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
@@ -173,7 +169,6 @@ class TestHttpSensor:
endpoint="",
request_params={},
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
@@ -199,7 +194,6 @@ class TestHttpSensor:
request_params={},
method="HEAD",
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
@@ -260,7 +254,6 @@ class TestHttpSensor:
request_params={},
method="GET",
response_check=resp_check,
- timeout=5,
poke_interval=1,
)
with pytest.raises(AirflowException, match="500:Internal Server
Error"):