From ee4164ae52d3cb522083a8d3b08a2daf160930f0 Mon Sep 17 00:00:00 2001 From: Florian Pilz Date: Tue, 9 Jan 2024 15:22:32 +0100 Subject: [PATCH] Set log level to FATAL during spec runs 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. --- spec/spec_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 35ad149..0e257bf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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|