We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1640d6e commit de602a5Copy full SHA for de602a5
1 file changed
tests/test_context.py
@@ -474,6 +474,11 @@ def close():
474
# send data
475
await self.loop.run_in_executor(None,
476
ssl_sock.send, b'hello')
477
+ # After gh-105836 run_in_executor may resolve without
478
+ # yielding. This is very noticeable when PYTHONASYNCIODEBUG
479
+ # is set. Hence, we yield explicitly so that the sent data
480
+ # can reach the SSL buffer before close/resume_reading.
481
+ await asyncio.sleep(0)
482
# schedule a proactive transport close which will trigger
483
# the flushing process to retrieve the remaining data
484
self.loop.call_soon(close)
0 commit comments