Skip to content

Commit df12ca0

Browse files
committed
Do not write to debug.log in activerecord tests on CI
1 parent 46bd163 commit df12ca0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

activerecord/test/support/connection.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ def self.test_configuration_hashes
2121
def self.connect
2222
ActiveRecord.async_query_executor = :global_thread_pool
2323
puts "Using #{connection_name}"
24-
ActiveRecord::Base.logger = ActiveSupport::Logger.new("debug.log", 1, 100 * 1024 * 1024)
24+
25+
if ENV["CI"]
26+
ActiveRecord::Base.logger = nil
27+
else
28+
ActiveRecord::Base.logger = ActiveSupport::Logger.new("debug.log", 1, 100.megabytes)
29+
end
30+
2531
ActiveRecord::Base.configurations = test_configuration_hashes
2632
ActiveRecord::Base.establish_connection :arunit
2733
ARUnit2Model.establish_connection :arunit2

0 commit comments

Comments
 (0)