Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 15:10:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-24 15:10:16 +0300
commit5c8c561ac63d7b8f372316b4409500474220fcda (patch)
tree20586ba87f12052ee507171b07f61dd21d9f1fd8 /spec/spec_helper.rb
parentb1b7c2f9a744197a111c81719c546a474adab4e8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fe03621b9bf..c69ac915320 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -286,12 +286,7 @@ RSpec.configure do |config|
end
config.around(:example, :request_store) do |example|
- RequestStore.begin!
-
- example.run
-
- RequestStore.end!
- RequestStore.clear!
+ Gitlab::WithRequestStore.with_request_store { example.run }
end
config.around do |example|
@@ -305,12 +300,10 @@ RSpec.configure do |config|
Gitlab::SidekiqMiddleware.server_configurator(
metrics: false, # The metrics don't go anywhere in tests
arguments_logger: false, # We're not logging the regular messages for inline jobs
- memory_killer: false, # This is not a thing we want to do inline in tests
- # Don't enable this if the request store is active in the spec itself
- # This needs to run within the `request_store` around block defined above
- request_store: !RequestStore.active?
+ memory_killer: false # This is not a thing we want to do inline in tests
).call(chain)
chain.add DisableQueryLimit
+ chain.insert_after ::Gitlab::SidekiqMiddleware::RequestStoreMiddleware, IsolatedRequestStore
example.run
end