diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/support/caching.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/support/caching.rb')
-rw-r--r-- | spec/support/caching.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/caching.rb b/spec/support/caching.rb index 11e4f534971..b18223523db 100644 --- a/spec/support/caching.rb +++ b/spec/support/caching.rb @@ -37,8 +37,8 @@ RSpec.configure do |config| end config.around(:each, :use_sql_query_cache) do |example| - ActiveRecord::Base.cache do - example.run - end + base_models = Gitlab::Database.database_base_models_with_gitlab_shared.values + inner_proc = proc { example.run } + base_models.inject(inner_proc) { |proc, base_model| proc { base_model.cache { proc.call } } }.call end end |