From c160f390a85cdc464ab58d397840687cc9039628 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 16 Nov 2017 10:49:35 +0800 Subject: [PATCH] set request timeout default to 120 seconds --- httprunner/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httprunner/client.py b/httprunner/client.py index 9a0dcc29..0da64566 100644 --- a/httprunner/client.py +++ b/httprunner/client.py @@ -114,6 +114,8 @@ class HttpSession(requests.Session): kwargs["auth"] = HttpNtlmAuth( auth_account["username"], auth_account["password"]) + kwargs.setdefault("timeout", 120) + response = self._send_request_safe_mode(method, url, **kwargs) request_meta["url"] = (response.history and response.history[0] or response)\ .request.path_url