diff options
author | Igor <idrozdov@gitlab.com> | 2019-09-03 09:19:21 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-09-03 09:19:21 +0300 |
commit | 8dcddb9886a679baf2d37cc907374ccaf58d1a85 (patch) | |
tree | cdf61512d9ac31ef43f417a45a257bdd36f10fa0 /spec/spec_helper.rb | |
parent | ab27d66a7f70caa8eb9b676d76a108124321b101 (diff) |
Stub DetectRepositoryLanguagesWorker for all tests
It performs an expensive operation, but isn't required in
most of tests
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index bd504f1553b..6ce76af556f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -148,6 +148,12 @@ RSpec.configure do |config| .with(:force_autodevops_on_by_default, anything) .and_return(false) + # Stub this call due to being an expensive operation + # It can be reenabled for specific tests via: + # + # allow(DetectRepositoryLanguagesWorker).to receive(:perform_async).and_call_original + allow(DetectRepositoryLanguagesWorker).to receive(:perform_async).and_return(true) + Gitlab::ThreadMemoryCache.cache_backend.clear end |