Skip to content
Snippets Groups Projects
Commit d04ae01a authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'remove-unnecessary-ignore-for-gitaly-n-plus-one' into 'master'

Remove unnecessary ignore for Gitaly N+1

Closes #47594

See merge request gitlab-org/gitlab-ce!20393
parents 3bdaeb94 37a6be36
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -429,7 +429,7 @@ module Gitlab
def self.count_stack
return unless RequestStore.active?
 
stack_string = caller.drop(1).join("\n")
stack_string = Gitlab::Profiler.clean_backtrace(caller).drop(1).join("\n")
 
RequestStore.store[:stack_counter] ||= Hash.new
 
Loading
Loading
Loading
Loading
@@ -12,15 +12,15 @@ describe NotificationRecipientService do
 
def create_watcher
watcher = create(:user)
create(:notification_setting, project: project, user: watcher, level: :watch)
create(:notification_setting, source: project, user: watcher, level: :watch)
 
other_projects.each do |other_project|
create(:notification_setting, project: other_project, user: watcher, level: :watch)
create(:notification_setting, source: other_project, user: watcher, level: :watch)
end
end
 
it 'avoids N+1 queries', :request_store do
Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher }
create_watcher
 
service.build_new_note_recipients(note)
 
Loading
Loading
@@ -28,7 +28,7 @@ describe NotificationRecipientService do
service.build_new_note_recipients(note)
end
 
Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher }
create_watcher
 
expect { service.build_new_note_recipients(note) }.not_to exceed_query_limit(control_count)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment