Commit c895009a authored by Denis Bilenko's avatar Denis Bilenko

test__pool.py: increase timeouts to avoid timing failures on busy/slow machines

parent 34cdf137
...@@ -268,12 +268,11 @@ class TestSpawn(greentest.TestCase): ...@@ -268,12 +268,11 @@ class TestSpawn(greentest.TestCase):
def test(self): def test(self):
p = pool.Pool(1) p = pool.Pool(1)
self.assertEqual(len(p), 0) self.assertEqual(len(p), 0)
p.spawn(gevent.sleep, 0.01) p.spawn(gevent.sleep, 0.1)
self.assertEqual(len(p), 1) self.assertEqual(len(p), 1)
p.spawn(gevent.sleep, 0.01) p.spawn(gevent.sleep, 0.1) # this spawn blocks until the old one finishes
self.assertEqual(len(p), 1) self.assertEqual(len(p), 1)
self.assertEqual(len(p), 1) gevent.sleep(0.19)
gevent.sleep(0.019)
self.assertEqual(len(p), 0) self.assertEqual(len(p), 0)
......
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