aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/connection_pool_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-05-18 21:30:42 +0930
committerMatthew Draper <matthew@trebex.net>2015-05-18 21:30:42 +0930
commitfcae2014ec09fa57448216a3edd70530b04a6510 (patch)
tree3c78902543a05acf9c6716732e51bbf808a1d1e8 /activerecord/test/cases/connection_pool_test.rb
parent41e5e8982bdff21db39b673363c42a75995d1880 (diff)
downloadrails-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.
Diffstat (limited to 'activerecord/test/cases/connection_pool_test.rb')
-rw-r--r--activerecord/test/cases/connection_pool_test.rb4
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