[Python-checkins] Fix asyncio flaky tests (#7023)
Andrew Svetlov
webhook-mailer at python.org
Mon May 21 05:03:55 EDT 2018
https://github.com/python/cpython/commit/e2537521916c5bf88fcf54d4654ff1bcd332be4a
commit: e2537521916c5bf88fcf54d4654ff1bcd332be4a
branch: master
author: Andrew Svetlov <andrew.svetlov at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-05-21T12:03:45+03:00
summary:
Fix asyncio flaky tests (#7023)
files:
M Lib/test/test_asyncio/test_base_events.py
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 72c63df91070..a14c55693539 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1855,9 +1855,10 @@ def prepare(self):
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
More information about the Python-checkins
mailing list