Skip to content

Commit

Permalink
Set log level to FATAL during spec runs
Browse files Browse the repository at this point in the history
Since the logger is printing messages to STDOUT, all DEBUG, INFO and
ERROR logs produced during tests are included in the test output. Since
we rely heavily on failing to process a message on purpose, we have
littered the output with ERROR logs and traces as well. By setting the
log level to FATAL during spec runs, we ensure that we only see the spec
output during test runs.
  • Loading branch information
florianpilz committed Jan 10, 2024
1 parent 02087b3 commit ee4164a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

RSpec.configure do |config|

config.before(:each) do

config.before(:all) do
# Set logging level to FATAL to prevent showing retry ERROR logs etc during test runs
EventQ.logger.level = Logger::FATAL
end

config.expect_with :rspec do |expectations|
Expand Down

0 comments on commit ee4164a

Please sign in to comment.