Skip to content

Commit bfe0bd1

Browse files
[PR #10977/48f5324b backport][3.12] Fix flakey test_aiohttp_request_ctx_manager_close_sess_on_error test (#10980)
Co-authored-by: J. Nick Koston <[email protected]>
1 parent 8368069 commit bfe0bd1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_client_functional.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,6 +3393,9 @@ async def handler(request):
33933393
pass
33943394

33953395
assert cm._session.closed
3396+
# Allow event loop to process transport cleanup
3397+
# on Python < 3.11
3398+
await asyncio.sleep(0)
33963399

33973400

33983401
async def test_aiohttp_request_ctx_manager_not_found() -> None:

0 commit comments

Comments
 (0)