summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-05-03 04:02:15 +0000
committerStan Hu <stanhu@gmail.com>2019-05-03 04:02:15 +0000
commit0595c6d5cd45fbf34f8779be544df72f83647915 (patch)
tree311848bff1d5a1a4b52c334f27730e090c1ff560 /spec/requests
parent3a36c08bdda3f37848ae5d556cfd74923f8ab63b (diff)
downloadgitlab-ce-0595c6d5cd45fbf34f8779be544df72f83647915.tar.gz
Whitelist query limits for internal API
When creating a merge request for push options, there may be over 100 queries that are run to create a merge request. Even after we reduce the number of queries by disabling the Sidekiq jobs, it appears we still hover near this limit. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/11450
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/internal_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index 88c19448373..bae0302f3ff 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -959,7 +959,9 @@ describe API::Internal do
it 'creates a new merge request' do
expect do
- post api('/internal/post_receive'), params: valid_params
+ Sidekiq::Testing.fake! do
+ post api('/internal/post_receive'), params: valid_params
+ end
end.to change { MergeRequest.count }.by(1)
end