Skip to content

Commit

Permalink
Fix test_socket_reclamation in Gevent 1.0, PYTHON-521
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdavis committed May 28, 2013
1 parent e4f6e4f commit 5197334
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_pooling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,10 @@ def leak_request():
g.start()
g.join(1)
self.assertTrue(g.ready(), "Greenlet is hung")

# In Gevent after 0.13.8, join() returns before the Greenlet.link
# callback fires. Give it a moment to reclaim the socket.
gevent.sleep(0.1)
else:
lock = thread.allocate_lock()
lock.acquire()
Expand Down

0 comments on commit 5197334

Please sign in to comment.