diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-01 17:39:12 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-16 14:04:45 +0200 |
commit | 19a290e7bfcb5e74a0e9975fd3f7396ca0e2e990 (patch) | |
tree | b66ccc595d014cc48251d2e0c8ede9e02be0aa1c /spec/services/git_push_service_spec.rb | |
parent | fdcafe72d1e103821ecad075dec82a84ad24387b (diff) | |
download | gitlab-ce-19a290e7bfcb5e74a0e9975fd3f7396ca0e2e990.tar.gz |
Reduce queries in IssueReferenceFilterbanzai-issue-filter-queries
This reduces the number of queries executed in IssueReferenceFilter by
retrieving the various projects/issues that may be referenced in batches
_before_ iterating over all the HTML nodes.
A chunk of the logic resides in AbstractReferenceFilter so it can be
re-used by other filters in the future.
Diffstat (limited to 'spec/services/git_push_service_spec.rb')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 18692f1279a..f99ad046f0d 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -312,7 +312,8 @@ describe GitPushService, services: true do end it "doesn't close issues when external issue tracker is in use" do - allow(project).to receive(:default_issues_tracker?).and_return(false) + allow_any_instance_of(Project).to receive(:default_issues_tracker?). + and_return(false) # The push still shouldn't create cross-reference notes. expect do |