summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-03 23:21:37 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-03 23:21:37 (GMT)
commit43bf045be09f50c17627bfa3dd2ce386ddf37304 (patch)
treed10935dea74ff5d937f4f1b6b63c471e98d30d09 /Lib/test/test_socket.py
parent9c25486093a28c345896dcd13a84d8cd5f535763 (diff)
downloadcpython-43bf045be09f50c17627bfa3dd2ce386ddf37304.zip
cpython-43bf045be09f50c17627bfa3dd2ce386ddf37304.tar.gz
cpython-43bf045be09f50c17627bfa3dd2ce386ddf37304.tar.bz2
Issue #11749: try to fix transient test_socket failure
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 9ba391e..e745502 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1384,6 +1384,10 @@ class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase):
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)