diff options
author | Matthew Draper <matthew@trebex.net> | 2015-05-18 21:30:42 +0930 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-05-18 21:30:42 +0930 |
commit | fcae2014ec09fa57448216a3edd70530b04a6510 (patch) | |
tree | 3c78902543a05acf9c6716732e51bbf808a1d1e8 | |
parent | 41e5e8982bdff21db39b673363c42a75995d1880 (diff) | |
download | rails-fcae2014ec09fa57448216a3edd70530b04a6510.tar.gz rails-fcae2014ec09fa57448216a3edd70530b04a6510.tar.bz2 rails-fcae2014ec09fa57448216a3edd70530b04a6510.zip |
sqlite3_mem has an existing connection
We must account for receiving one less call to #new_connection, but the
test otherwise remains valid.
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index 90b6fb55ef..c905772193 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -358,7 +358,9 @@ module ActiveRecord end def test_concurrent_connection_establishment - all_threads_in_new_connection = ActiveSupport::Concurrency::Latch.new(@pool.size) + assert_operator @pool.connections.size, :<=, 1 + + all_threads_in_new_connection = ActiveSupport::Concurrency::Latch.new(@pool.size - @pool.connections.size) all_go = ActiveSupport::Concurrency::Latch.new @pool.singleton_class.class_eval do |