diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-03 23:22:06 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-03 23:22:06 (GMT) |
commit | fc2e3763c81ab6a2b25308046bc42bab12afeb69 (patch) | |
tree | bc051376a4bde0480d7ea9f1de8da1ce261eb2f0 /Lib | |
parent | 43b21687a5f8d4fd9b4a99f7991cd6b2f48d8a83 (diff) | |
parent | 43bf045be09f50c17627bfa3dd2ce386ddf37304 (diff) | |
download | cpython-fc2e3763c81ab6a2b25308046bc42bab12afeb69.zip cpython-fc2e3763c81ab6a2b25308046bc42bab12afeb69.tar.gz cpython-fc2e3763c81ab6a2b25308046bc42bab12afeb69.tar.bz2 |
Issue #11749: try to fix transient test_socket failure
Diffstat (limited to 'Lib')
-rw-r--r-- | 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 index 8b23ae9..6ee94b5 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1411,6 +1411,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) |