Skip to content

Ensure we set SUITE_FLAKY_RSPEC_REPORT_PATH to nil in RspecFlaky::Listener spec

username-removed-128633 requested to merge 38872-fix-rspec-flaky-spec into master

What does this MR do?

  1. The spec is checking that when no report file exists, the report is {}.

  2. The problem is that by default we're looking for ENV['SUITE_FLAKY_RSPEC_REPORT_PATH'].

  3. In !14681 (merged), the spec passed because the content of the file at the path ENV['SUITE_FLAKY_RSPEC_REPORT_PATH'] was {} since no actual report had been populated (since the report name has been changed and it's only populated on master).

  4. Once merged, and flaky tests were detected and saved into the report at ENV['SUITE_FLAKY_RSPEC_REPORT_PATH'], the spec was silently loading this default file, and the test would fail since the file was not equal to {} anymore.

Stubbing ENV['SUITE_FLAKY_RSPEC_REPORT_PATH'] solves the issue.

Are there points in the code the reviewer needs to double check?

No.

Why was this MR needed?

Red master!

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #38872 (closed)

Merge request reports