From 2ecc9d9b609db91a4a52dc8ebf224ab626c6d160 Mon Sep 17 00:00:00 2001 From: Jonathan Lee Date: Mon, 24 Jun 2024 14:12:11 -0400 Subject: [PATCH] Don't honor per-request timeout for now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a partial revert of #46869. Using a nondefault timeout fails with: ``` ▶ ERROR [expected OK] external/wpt/IndexedDB/idbindex-query-exception-order.html └ → WebDriverRun.run_func didn't set a result Exception in thread Thread-4: Traceback (most recent call last): File "/tmp/wpt/tools/webdriver/webdriver/transport.py", line 259, in _request previous_timeout = self._conn.gettimeout() AttributeError: 'HTTPConnection' object has no attribute 'gettimeout' ``` ... because `{get,set}timeout` are methods on `socket.socket`, not `HTTP(S)Connection`. --- tools/webdriver/webdriver/transport.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/webdriver/webdriver/transport.py b/tools/webdriver/webdriver/transport.py index e5ed3473ed4b0d..ca1ff74ef96767 100644 --- a/tools/webdriver/webdriver/transport.py +++ b/tools/webdriver/webdriver/transport.py @@ -204,8 +204,6 @@ def send(self, ``json.JSONEncoder`` unless specified. :param decoder: JSON decoder class, which defaults to ``json.JSONDecoder`` unless specified. - :param timeout: Optional timeout for the underlying socket. `None` will - retain the existing timeout. :param codec_kwargs: Surplus arguments passed on to `encoder` and `decoder` on construction. @@ -233,7 +231,7 @@ def send(self, # runner thread. We use the boolean below to check for that and restart # the connection in that case. self._last_request_is_blocked = True - response = self._request(method, uri, payload, headers, timeout=timeout) + response = self._request(method, uri, payload, headers, timeout=None) self._last_request_is_blocked = False return Response.from_http(response, decoder=decoder, **codec_kwargs)