Improve slow tests in ./ee/spec/support/shared_examples/services/search_service_shared_examples.rb
Summary
The total running time of specs that use ./ee/spec/support/shared_examples/services/search_service_shared_examples.rb is high.
From https://gitlab-org.gitlab.io/rspec_profiling_stats/ the top candidates for improvement for groupglobal search are:
Proposal
Improvements could be:
- using
let_it_be. this will also require changes to index data in abeforeblock becauselet_it_behappens before the application settings stubs and the data would not be indexed automatically. - splitting
visibilitycontext specs up into smaller files (see discussion: #325719 (comment 554517227)) and example split spec ingroup_service_blob_and_commit_visibility_spec.rb
Info
This issue was generated from the
rspec profiling project
which profiles rspec tests in pipelines run against the default branch on
gitlab-org/gitlab.
Edited by Terri Chu