diff options
author | Igor <idrozdov@gitlab.com> | 2019-09-03 06:19:21 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-09-03 06:19:21 +0000 |
commit | 8dcddb9886a679baf2d37cc907374ccaf58d1a85 (patch) | |
tree | cdf61512d9ac31ef43f417a45a257bdd36f10fa0 /app/models/repository.rb | |
parent | ab27d66a7f70caa8eb9b676d76a108124321b101 (diff) | |
download | gitlab-ce-8dcddb9886a679baf2d37cc907374ccaf58d1a85.tar.gz |
Stub DetectRepositoryLanguagesWorker for all tests
It performs an expensive operation, but isn't required in
most of tests
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 7882b2b3036..5cb4b56a114 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -456,6 +456,10 @@ class Repository def after_import expire_content_cache + # This call is stubbed in tests due to being an expensive operation + # It can be reenabled for specific tests via: + # + # allow(DetectRepositoryLanguagesWorker).to receive(:perform_async).and_call_original DetectRepositoryLanguagesWorker.perform_async(project.id) end |