]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
increase the timeout here to accommodate slowness on the buildbot
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 22 Feb 2010 16:17:57 +0000 (16:17 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 22 Feb 2010 16:17:57 +0000 (16:17 +0000)
test/engine/test_pool.py

index 53a7e40e9b192889a30978d3d634becb81288288..2b6ee5e58da36d4f15ee25b04d69fecca35596c5 100644 (file)
@@ -499,7 +499,10 @@ class QueuePoolTest(PoolTestBase):
         # wait for the timeout on queue.get().  the fix involves checking the
         # timeout again within the mutex, and if so, unlocking and throwing
         # them back to the start of do_get()
-        p = pool.QueuePool(creator = lambda: mock_dbapi.connect(delay=.05), pool_size = 2, max_overflow = 1, use_threadlocal = False, timeout=3)
+        p = pool.QueuePool(
+                creator = lambda: mock_dbapi.connect(delay=.05), 
+                pool_size = 2, 
+                max_overflow = 1, use_threadlocal = False, timeout=3)
         timeouts = []
         def checkout():
             for x in xrange(1):
@@ -523,7 +526,8 @@ class QueuePoolTest(PoolTestBase):
         print timeouts
         assert len(timeouts) > 0
         for t in timeouts:
-            assert abs(t - 3) < 1, "Not all timeouts were 3 seconds: " + repr(timeouts)
+            assert abs(t - 3) < 1.5, "Not all timeouts were within 50% of 3 seconds: "\
+                                        + repr(timeouts)
 
     def _test_overflow(self, thread_count, max_overflow):
         def creator():