summaryrefslogtreecommitdiff
path: root/test/engine/test_pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-13 11:52:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-13 11:52:17 -0500
commitc4d429fc2a0700d61ba01cecd2157c6774feddf0 (patch)
tree69ef21c9f8ef2fc81c42a587cf245ec5739a3e89 /test/engine/test_pool.py
parent1f27092a453ce9f9a48a007e4b046c48f5aa21aa (diff)
downloadsqlalchemy-c4d429fc2a0700d61ba01cecd2157c6774feddf0.tar.gz
fix the timeout test once and for all
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r--test/engine/test_pool.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py
index 924f2e8af..93bcae654 100644
--- a/test/engine/test_pool.py
+++ b/test/engine/test_pool.py
@@ -511,7 +511,7 @@ class QueuePoolTest(PoolTestBase):
try:
c1 = p.connect()
except tsa.exc.TimeoutError, e:
- timeouts.append(int(time.time()) - now)
+ timeouts.append(time.time() - now)
continue
time.sleep(4)
c1.close()
@@ -524,11 +524,12 @@ class QueuePoolTest(PoolTestBase):
for th in threads:
th.join()
- print timeouts
assert len(timeouts) > 0
for t in timeouts:
- assert abs(t - 3) < 1.5, "Not all timeouts were within 50% of 3 seconds: "\
- + repr(timeouts)
+ assert t >= 3, "Not all timeouts were >= 3 seconds %r" % timeouts
+ # normally, the timeout should under 4 seconds,
+ # but on a loaded down buildbot it can go up.
+ assert t < 10, "Not all timeouts were < 10 seconds %r" % timeouts
def _test_overflow(self, thread_count, max_overflow):
gc_collect()