Skip to content

Faster elasticsearch specs

Robert May requested to merge speedier-search-spec into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Drastically reduces the overhead on :elastic tagged specs. This causes issues with some specs, so I've maintained the old setup as :elastic_clean and applied that manually to the failing specs.

Examples

Running ee/spec/controllers/ee/search_controller_spec.rb

Before

Finished in 39 minutes 13 seconds (files took 8.32 seconds to load)
71 examples, 0 failures

After

Finished in 1 minute 7.04 seconds (files took 9 seconds to load)
71 examples, 0 failures

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Enable elastic search by following https://gitlab.com/gitlab-org/gitlab-development-kit/blob/main/doc/howto/elasticsearch.md#enable-elasticsearch-in-the-gdk
  2. gdk restart
  3. Run the specs.

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 Abdul Wadood

Merge request reports