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:
authorSean McGivern <sean@gitlab.com>2018-06-08 13:45:36 +0300
committerSean McGivern <sean@gitlab.com>2018-06-08 13:45:36 +0300
commitf413c4dd267f3a5906bf6c5b3c4eb3b45f8ac60a (patch)
tree9c0d229264d01699b415e715ed3a7881e6cfbf21 /spec/services/notification_recipient_service_spec.rb
parent2c05c8574f9bdef89008381754aee9566b58ad86 (diff)
Fix NotificationRecipientService spec for EE
EE checks a license, which needs RequestStore enabled to avoid N+1 queries. However, enabling RequestStore causes Gitaly to complain about N+1 invocations, which we really don't care about here.
Diffstat (limited to 'spec/services/notification_recipient_service_spec.rb')
-rw-r--r--spec/services/notification_recipient_service_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/notification_recipient_service_spec.rb b/spec/services/notification_recipient_service_spec.rb
index 340d4585e0c..7f536ce4e68 100644
--- a/spec/services/notification_recipient_service_spec.rb
+++ b/spec/services/notification_recipient_service_spec.rb
@@ -19,8 +19,8 @@ describe NotificationRecipientService do
end
end
- it 'avoids N+1 queries' do
- create_watcher
+ it 'avoids N+1 queries', :request_store do
+ Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher }
service.build_new_note_recipients(note)
@@ -28,7 +28,7 @@ describe NotificationRecipientService do
service.build_new_note_recipients(note)
end
- create_watcher
+ Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher }
expect { service.build_new_note_recipients(note) }.not_to exceed_query_limit(control_count)
end