Prepare Elastic indices only before context, not before examples
What does this MR do?
In some Elastic-related tests, we don't have to rebuild the indices before each test,
and delete them after each test, we can just create the indices in a before(:context)
block and delete them in an after(:context)
block.
By doing that, we easily reduce the timing of ee/spec/services/search/project_service_spec.rb
by half, from 29 minutes to 14 minutes.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because test.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Related to #325719 (closed).
Edited by Rémy Coutable