From f413c4dd267f3a5906bf6c5b3c4eb3b45f8ac60a Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Fri, 8 Jun 2018 11:45:36 +0100 Subject: [PATCH] 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. --- spec/services/notification_recipient_service_spec.rb | 6 +++--- 1 file 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