Skip to content

Commit

Permalink
Don't honor per-request timeout for now
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
jonathan-j-lee committed Jun 24, 2024
1 parent 8b16a57 commit 2ecc9d9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/webdriver/webdriver/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2ecc9d9

Please sign in to comment.