[Python-checkins] cpython (3.2): Issue #11749: try to fix transient test_socket failure
antoine.pitrou
python-checkins at python.org
Mon Apr 4 01:22:34 CEST 2011
http://hg.python.org/cpython/rev/68a319ef70fc
changeset: 69122:68a319ef70fc
branch: 3.2
parent: 69114:88ed3de28520
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Apr 04 01:21:37 2011 +0200
summary:
Issue #11749: try to fix transient test_socket failure
files:
Lib/test/test_socket.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1384,6 +1384,10 @@
self.evt1.set()
self.evt2.wait(1.0)
first_seg = self.read_file.read(len(self.read_msg) - 3)
+ if first_seg is None:
+ # Data not arrived (can happen under Windows), wait a bit
+ time.sleep(0.5)
+ first_seg = self.read_file.read(len(self.read_msg) - 3)
buf = bytearray(10)
n = self.read_file.readinto(buf)
self.assertEqual(n, 3)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list