Commit 4460c347 authored by Richard Oudkerk's avatar Richard Oudkerk

Minor fix for multiprocessing unit test

Read from socket might have returned partial message.
parent 3e268aac
......@@ -2034,7 +2034,14 @@ class _TestPicklingConnections(BaseTestCase):
address = lconn.recv()
rconn.send((address, msg))
new_conn = lconn.recv()
self.assertEqual(new_conn.recv(100), msg.upper())
buf = []
while True:
s = new_conn.recv(100)
if not s:
break
buf.append(s)
buf = b''.join(buf)
self.assertEqual(buf, msg.upper())
new_conn.close()
lconn.send(None)
......
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