diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-29 06:08:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-29 06:08:28 +0300 |
commit | a412f4f58679c9d9120da6dc69ff02a6fcec0c5a (patch) | |
tree | b7291e74be60c903021263a05cefa74df7c616a4 /spec/graphql | |
parent | aa02d34e841f2e01820aae1e27233fe655bdf90c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/graphql')
-rw-r--r-- | spec/graphql/resolvers/group_labels_resolver_spec.rb | 4 | ||||
-rw-r--r-- | spec/graphql/resolvers/labels_resolver_spec.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/graphql/resolvers/group_labels_resolver_spec.rb b/spec/graphql/resolvers/group_labels_resolver_spec.rb index 341448d7add..08e17cedfcc 100644 --- a/spec/graphql/resolvers/group_labels_resolver_spec.rb +++ b/spec/graphql/resolvers/group_labels_resolver_spec.rb @@ -65,7 +65,7 @@ RSpec.describe Resolvers::GroupLabelsResolver do end it 'prevents N+1 queries' do - control = Gitlab::WithRequestStore.with_request_store do + control = Gitlab::SafeRequestStore.ensure_request_store do ActiveRecord::QueryRecorder.new { resolve_labels(group, params).to_a } end @@ -75,7 +75,7 @@ RSpec.describe Resolvers::GroupLabelsResolver do create(:group_label, group: another_subgroup, name: 'another group feature') expect do - Gitlab::WithRequestStore.with_request_store do + Gitlab::SafeRequestStore.ensure_request_store do resolve_labels(group, params).to_a end end.not_to exceed_query_limit(control.count) diff --git a/spec/graphql/resolvers/labels_resolver_spec.rb b/spec/graphql/resolvers/labels_resolver_spec.rb index 8196315dd7c..16cf2e73736 100644 --- a/spec/graphql/resolvers/labels_resolver_spec.rb +++ b/spec/graphql/resolvers/labels_resolver_spec.rb @@ -65,7 +65,7 @@ RSpec.describe Resolvers::LabelsResolver do end it 'prevents N+1 queries' do - control = Gitlab::WithRequestStore.with_request_store do + control = Gitlab::SafeRequestStore.ensure_request_store do ActiveRecord::QueryRecorder.new { resolve_labels(project, params).to_a } end @@ -75,7 +75,7 @@ RSpec.describe Resolvers::LabelsResolver do create(:group_label, group: another_subgroup, name: 'another group feature') expect do - Gitlab::WithRequestStore.with_request_store do + Gitlab::SafeRequestStore.ensure_request_store do resolve_labels(project, params).to_a end end.not_to exceed_query_limit(control.count) |