Skip to content

Fix flaky spec in record fetcher

Max Orefice requested to merge morefice/fix-flaky-record-fetcher into master

Ref: #383028 (closed)

What does this MR do and why?

This MR fixes a flaky spec identified while removing Timecop references in !101499 (merged).

It turns out let_it_be is called before the around block where the time was frozen.

To fix this spec, we are now freezing the time with before_all which is called right before let_it_be.

bundle exec rspec --order defined ./spec/lib/gitlab/analytics/cycle_analytics/records_fetcher_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading