Commit 8c40e539 authored by Rémy Coutable's avatar Rémy Coutable

Only use RspecFlaky::Listener when 'FLAKY_RSPEC_GENERATE_REPORT' is set

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent d56cf9ca
...@@ -24,7 +24,7 @@ function update_tests_metadata() { ...@@ -24,7 +24,7 @@ function update_tests_metadata() {
scripts/merge-reports "${FLAKY_RSPEC_SUITE_REPORT_PATH}" rspec_flaky/all_*.json scripts/merge-reports "${FLAKY_RSPEC_SUITE_REPORT_PATH}" rspec_flaky/all_*.json
export FLAKY_RSPEC_GENERATE_REPORT="1" export FLAKY_RSPEC_GENERATE_REPORT="true"
scripts/flaky_examples/prune-old-flaky-examples "${FLAKY_RSPEC_SUITE_REPORT_PATH}" scripts/flaky_examples/prune-old-flaky-examples "${FLAKY_RSPEC_SUITE_REPORT_PATH}"
if [[ -n ${TESTS_METADATA_S3_BUCKET} ]]; then if [[ -n ${TESTS_METADATA_S3_BUCKET} ]]; then
......
...@@ -124,6 +124,9 @@ RSpec.configure do |config| ...@@ -124,6 +124,9 @@ RSpec.configure do |config|
if ENV['CI'] || ENV['RETRIES'] if ENV['CI'] || ENV['RETRIES']
# This includes the first try, i.e. tests will be run 4 times before failing. # This includes the first try, i.e. tests will be run 4 times before failing.
config.default_retry_count = ENV.fetch('RETRIES', 3).to_i + 1 config.default_retry_count = ENV.fetch('RETRIES', 3).to_i + 1
end
if ENV['FLAKY_RSPEC_GENERATE_REPORT']
config.reporter.register_listener( config.reporter.register_listener(
RspecFlaky::Listener.new, RspecFlaky::Listener.new,
:example_passed, :example_passed,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment