Skip to content

Commit

Permalink
Do not write to debug.log in activerecord tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed Aug 24, 2023
1 parent 46bd163 commit df12ca0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion activerecord/test/support/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ def self.test_configuration_hashes
def self.connect
ActiveRecord.async_query_executor = :global_thread_pool
puts "Using #{connection_name}"
ActiveRecord::Base.logger = ActiveSupport::Logger.new("debug.log", 1, 100 * 1024 * 1024)

if ENV["CI"]
ActiveRecord::Base.logger = nil
else
ActiveRecord::Base.logger = ActiveSupport::Logger.new("debug.log", 1, 100.megabytes)
end

ActiveRecord::Base.configurations = test_configuration_hashes
ActiveRecord::Base.establish_connection :arunit
ARUnit2Model.establish_connection :arunit2
Expand Down

0 comments on commit df12ca0

Please sign in to comment.