Commit f7a95cd6 authored by Denis Bilenko's avatar Denis Bilenko

test__pool.py: avoid leaking greenlets out of the test case

--HG--
extra : transplant_source : %EEoaGe%7D%D3%D8fN%B4%7E%23%16%B7%0B%E0%11aI
parent 5f7051a9
......@@ -270,16 +270,18 @@ class TestJoinSleep(greentest.GenericWaitTestCase):
def wait(self, timeout):
p = pool.Pool()
p.spawn(gevent.sleep, 10)
g = p.spawn(gevent.sleep, 10)
p.join(timeout=timeout)
g.kill()
class TestJoinSleep_raise_error(greentest.GenericWaitTestCase):
def wait(self, timeout):
p = pool.Pool()
p.spawn(gevent.sleep, 10)
g = p.spawn(gevent.sleep, 10)
p.join(timeout=timeout, raise_error=True)
g.kill()
class TestJoinEmpty(greentest.TestCase):
......
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