aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2016-11-19 22:07:40 +1030
committerMatthew Draper <matthew@trebex.net>2016-11-25 00:30:45 +1030
commitd314646c965b045724e6bdb9d61dcecfabc0ba8f (patch)
tree00d8106f708c2bb8df7d0579bb3d76c42843e759 /activerecord/test
parentf9230a2d424b177257056be9b9247cbe25caa101 (diff)
downloadrails-d314646c965b045724e6bdb9d61dcecfabc0ba8f.tar.gz
rails-d314646c965b045724e6bdb9d61dcecfabc0ba8f.tar.bz2
rails-d314646c965b045724e6bdb9d61dcecfabc0ba8f.zip
Distribute connections to previously blocked threads when we're done
Two methods block new connections; we were already doing the right thing for clear_reloadable_connections, but it's better placed in with_new_connections_blocked, where it can work for disconnect too.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/connection_pool_test.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb
index b08e4f603c..2437c99621 100644
--- a/activerecord/test/cases/connection_pool_test.rb
+++ b/activerecord/test/cases/connection_pool_test.rb
@@ -487,12 +487,6 @@ module ActiveRecord
#--- post test clean up start
second_thread_done.count_down if failed
- # after `pool.disconnect()` the first thread will be left stuck in queue, no need to wait for
- # it to timeout with ConnectionTimeoutError
- if (group_action_method == :disconnect || group_action_method == :disconnect!) && pool.num_waiting_in_queue > 0
- pool.with_connection {} # create a new connection in case there are threads still stuck in a queue
- end
-
first_thread.join
second_thread.join
#--- post test clean up end