diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-03 04:36:22 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-05 07:22:07 -0700 |
commit | 6f4a0a92e6331b7033a8165c5b5e9cc7b0f880c2 (patch) | |
tree | adc1945dc9672c998c00897ab896ee867d1dab7c /spec/requests/api | |
parent | 5426f09f4ab088f75bc84d043e2ac2fe4e852c44 (diff) | |
download | gitlab-ce-6f4a0a92e6331b7033a8165c5b5e9cc7b0f880c2.tar.gz |
Eliminate N+1 queries with authors and push_data_payload in Events API
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/events_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb index 962c845f36d..e6a61fdcf39 100644 --- a/spec/requests/api/events_spec.rb +++ b/spec/requests/api/events_spec.rb @@ -176,7 +176,7 @@ describe API::Events do end it 'avoids N+1 queries' do - control_count = ActiveRecord::QueryRecorder.new do + control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) do get api("/projects/#{private_project.id}/events", user), target_type: :merge_request end.count @@ -184,7 +184,7 @@ describe API::Events do expect do get api("/projects/#{private_project.id}/events", user), target_type: :merge_request - end.not_to exceed_query_limit(control_count) + end.not_to exceed_all_query_limit(control_count) expect(response).to have_gitlab_http_status(200) expect(response).to include_pagination_headers |