Commit 461261b7 authored by Jason Madden's avatar Jason Madden

Allow time to propagate (PyPy).

parent fad6b21f
......@@ -142,9 +142,15 @@ class Test(greentest.TestCase):
client = Client(server.server_port)
start_new_thread(client.make_request)
# Wait until we do our business
while server.socket is not None:
sleep(0.01)
# Wait until we do our business; we will always close
# the server; We may also close the client.
# On PyPy, we may not actually see the changes they write to
# their dicts immediately.
for obj in server, client:
if obj is None:
continue
while obj.socket is not None:
sleep(0.01)
# If we have a client, then we should have data
if run_client:
......@@ -153,7 +159,6 @@ class Test(greentest.TestCase):
return wref_to_hidden_server_socket
def run_and_check(self, run_client):
wref_to_hidden_server_socket = self.run_interaction(run_client=run_client)
greentest.gc_collect_if_needed()
......@@ -170,7 +175,6 @@ class Test(greentest.TestCase):
self.run_and_check(True)
self.run_and_check(True)
def test_timeout_exit(self):
self.run_and_check(False)
self.run_and_check(False)
......
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