diff options
author | Douwe Maan <douwe@selenight.nl> | 2018-12-28 12:19:55 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2019-01-02 15:31:35 +0100 |
commit | e893f560e01c0039a4fc4c6c93be8e82b5888b3b (patch) | |
tree | 03d8014fb8b3ad9906ccd90b25507bca629e7e58 /spec | |
parent | 7388a911aa61ad3a9fb061517e22e74427155b5e (diff) | |
download | gitlab-ce-e893f560e01c0039a4fc4c6c93be8e82b5888b3b.tar.gz |
Remove unnecessary double caching (in hash and request store)dm-git-access-any-ce
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_spec.rb | 7 | ||||
-rw-r--r-- | spec/serializers/pipeline_serializer_spec.rb | 2 |
2 files changed, 1 insertions, 8 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index f195f7ce48e..fa0f3620806 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -3932,13 +3932,6 @@ describe Project do .to be_falsy end - it 'caches the result' do - control = ActiveRecord::QueryRecorder.new { project.branch_allows_collaboration?(user, 'awesome-feature-1') } - - expect { 3.times { project.branch_allows_collaboration?(user, 'awesome-feature-1') } } - .not_to exceed_query_limit(control) - end - context 'when the requeststore is active', :request_store do it 'only queries per project across instances' do control = ActiveRecord::QueryRecorder.new { project.branch_allows_collaboration?(user, 'awesome-feature-1') } diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb index cf57776346a..79aa32b29bb 100644 --- a/spec/serializers/pipeline_serializer_spec.rb +++ b/spec/serializers/pipeline_serializer_spec.rb @@ -144,7 +144,7 @@ describe PipelineSerializer do # pipeline. With the same ref this check is cached but if refs are # different then there is an extra query per ref # https://gitlab.com/gitlab-org/gitlab-ce/issues/46368 - expect(recorded.count).to be_within(2).of(34) + expect(recorded.count).to be_within(2).of(38) expect(recorded.cached_count).to eq(0) end end |