Skip to content

Commit 2d583bf

Browse files
authored
Merge pull request #721 from ably/test/fix-rsc19e-timeout-assertion
fix: assert the timeout class RSC19e's budgets can actually produce
2 parents 40e7419 + 0db006a commit 2d583bf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/ably/rest/restrequest_test.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ async def test_timeout(self):
100100
timeout = 0.000001
101101
ably = AblyRest(token="foo", http_request_timeout=timeout)
102102
assert ably.http.http_request_timeout == timeout
103-
with pytest.raises(httpx.ReadTimeout):
103+
# `http_open_timeout` keeps its four-second default, so the request carries a
104+
# connect budget as well as a read budget and either can be the one to expire
105+
with pytest.raises(httpx.TimeoutException):
104106
await ably.request('GET', '/time', version=Defaults.protocol_version)
105107
await ably.close()
106108

0 commit comments

Comments
 (0)