Commit 879003a8 authored by Denis Bilenko's avatar Denis Bilenko

fix test__pool.py

parent 090cae8c
...@@ -33,6 +33,7 @@ class TestCoroutinePool(greentest.TestCase): ...@@ -33,6 +33,7 @@ class TestCoroutinePool(greentest.TestCase):
results = [] results = []
def producer(): def producer():
gevent.sleep(0.001)
results.append('prod') results.append('prod')
evt.set() evt.set()
...@@ -148,7 +149,7 @@ class PoolBasicTests(greentest.TestCase): ...@@ -148,7 +149,7 @@ class PoolBasicTests(greentest.TestCase):
p.apply_async(r.append, (4, )) p.apply_async(r.append, (4, ))
self.assertEqual(r, [1]) self.assertEqual(r, [1])
gevent.sleep(0.01) gevent.sleep(0.01)
self.assertEqual(r, [1, 2, 3, 4]) self.assertEqual(sorted(r), [1, 2, 3, 4])
def test_execute(self): def test_execute(self):
p = self.klass() p = self.klass()
......
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