Skip to content

Fix order-dependent Sidekiq config spec failures

Stan Hu requested to merge sh-fix-sidekiq-config-spec-16-7 into 16-7-stable-ee

What does this MR do and why?

This backports !140615 (merged) to the 16-7-stable-ee branch.

Previously the tests would fail if you ran:

bundle exec rspec spec/initializers/sidekiq_spec.rb spec/lib/gitlab/sidekiq_config_spec.rb

SidekiqConfig.load_cron_jobs! is memoized the first time it's run, so we need to clear this memoization in order to ensure the state doesn't leak from one test to another.

Edited by Stan Hu

Merge request reports

Loading