Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions spec/datadog/tracing/contrib/rails/support/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
end

after do
# NOTE: We forsibly close connection pool to avoid leaking connection between
# test cases.
# This call is safe to be used on already closed connection pool.
application_record.connection.disconnect! if application_record&.connected?

# Reset references stored in the Rails class
Rails.application = nil
Rails.logger = nil
Expand Down