mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Fix asyncio flaky tests (GH-7023) (#7024)
(cherry picked from commit e253752191
)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
This commit is contained in:
parent
b8b800090f
commit
4d39ade62a
1 changed files with 3 additions and 2 deletions
|
@ -1855,9 +1855,10 @@ class BaseLoopSockSendfileTests(test_utils.TestCase):
|
|||
|
||||
for _ in range(10):
|
||||
try:
|
||||
self.run_loop(self.loop.sock_connect(sock, (support.HOST, port)))
|
||||
self.run_loop(self.loop.sock_connect(sock,
|
||||
(support.HOST, port)))
|
||||
except OSError:
|
||||
time.sleep(0.5)
|
||||
self.run_loop(asyncio.sleep(0.5))
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue