Timeout the connection pool monitor on ruby 1.8 only

This commit is contained in:
Jeremy Kemper
2008-11-08 00:24:36 -05:00
parent 7c73518ef7
commit dd77733f2f
2 changed files with 18 additions and 7 deletions

View File

@@ -28,10 +28,13 @@ class PooledConnectionsTest < ActiveRecord::TestCase
end
end
def test_pooled_connection_checkout
checkout_connections
assert_equal @connections.length, 2
assert_equal @timed_out, 2
# Will deadlock due to lack of Monitor timeouts in 1.9
if RUBY_VERSION < '1.9'
def test_pooled_connection_checkout
checkout_connections
assert_equal @connections.length, 2
assert_equal @timed_out, 2
end
end
def checkout_checkin_connections(pool_size, threads)