fix "Mysql2::Error: This connection is in use by" in spec for Rails 4
Conflicts: Gemfile Gemfile.lock
This commit is contained in:
parent
2de4a2a3a0
commit
e88810e4a7
3 changed files with 4 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ class ActiveRecord::Base
|
|||
@@shared_connection = nil
|
||||
|
||||
def self.connection
|
||||
@@shared_connection || retrieve_connection
|
||||
@@shared_connection || ConnectionPool::Wrapper.new(:size => 1) { retrieve_connection }
|
||||
end
|
||||
end
|
||||
# Forces all threads to share the same connection. This works on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue