Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES/9705.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Reduced the runtime of a client timeout regression test by shortening its artificial response delay.
-- by :user:`nightcityblade`.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ Moss Collum
Mun Gwan-gyeong
Navid Sheikhol
Nicolas Braem
Night Cityblade
Nikolay Kim
Nikolay Novik
Nikolay Tiunov
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ pytest-aiohttp==1.1.0
# via
# -r requirements/lint.in
# -r requirements/test-common.in
pytest-asyncio==1.4.0a2
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pytest-aiohttp==1.1.0
# via
# -r requirements/lint.in
# -r requirements/test-common.in
pytest-asyncio==1.4.0a2
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pytest==9.0.3
# pytest-mock
pytest-aiohttp==1.1.0
# via -r requirements/lint.in
pytest-asyncio==1.4.0a2
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via -r requirements/lint.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/test-common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pytest==9.0.3
# pytest-xdist
pytest-aiohttp==1.1.0
# via -r requirements/test-common.in
pytest-asyncio==1.3.0
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via -r requirements/test-common.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/test-ft.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pytest==9.0.3
# pytest-xdist
pytest-aiohttp==1.1.0
# via -r requirements/test-common.in
pytest-asyncio==1.4.0a2
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via -r requirements/test-common.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pytest==9.0.3
# pytest-xdist
pytest-aiohttp==1.1.0
# via -r requirements/test-common.in
pytest-asyncio==1.4.0a2
pytest-asyncio==1.4.0
# via pytest-aiohttp
pytest-codspeed==5.0.3
# via -r requirements/test-common.in
Expand Down
8 changes: 4 additions & 4 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,17 +1159,17 @@ async def test_read_timeout_between_chunks(
async def handler(request: web.Request) -> web.StreamResponse:
resp = aiohttp.web.StreamResponse()
await resp.prepare(request)
# write data 4 times, with pauses. Total time 2 seconds.
# write data 4 times, with pauses. Total time 0.4 seconds.
for _ in range(4):
await asyncio.sleep(0.5)
await asyncio.sleep(0.1)
await resp.write(b"data\n")
return resp

app = web.Application()
app.add_routes([web.get("/", handler)])

# A timeout of 0.2 seconds should apply per read.
timeout = aiohttp.ClientTimeout(sock_read=1)
# The read timeout should apply per read, not to the whole response.
timeout = aiohttp.ClientTimeout(sock_read=0.2)
client = await aiohttp_client(app, timeout=timeout)

res = b""
Expand Down
Loading