Kaydet (Commit) 43bf045b authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #11749: try to fix transient test_socket failure

üst 9c254860
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment