summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-30 15:49:55 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-05-30 15:53:28 +0200
commit74caf54704704e30b8ed45e2459828890f416b08 (patch)
tree513758c0d40dcfcc2562bbdf937be5287f23e799 /spec/serializers
parenta2f6aa96a9f44a0c1880871c2d5a7b8638d8b3cb (diff)
downloadgitlab-ce-74caf54704704e30b8ed45e2459828890f416b08.tar.gz
Fix pipeline serializer queries count specs
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/pipeline_serializer_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb
index 7c7cdaedf10..e0e6eecb300 100644
--- a/spec/serializers/pipeline_serializer_spec.rb
+++ b/spec/serializers/pipeline_serializer_spec.rb
@@ -112,7 +112,7 @@ describe PipelineSerializer do
# gitaly calls in this block
# Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/37772
Gitlab::GitalyClient.allow_n_plus_1_calls do
- Ci::Pipeline::AVAILABLE_STATUSES.each do |status|
+ Ci::Pipeline::COMPLETED_STATUSES.each do |status|
create_pipeline(status)
end
end
@@ -125,7 +125,7 @@ describe PipelineSerializer do
it 'verifies number of queries', :request_store do
recorded = ActiveRecord::QueryRecorder.new { subject }
- expect(recorded.count).to be_within(1).of(31)
+ expect(recorded.count).to be_within(2).of(27)
expect(recorded.cached_count).to eq(0)
end
end
@@ -144,7 +144,7 @@ describe PipelineSerializer do
# pipeline. With the same ref this check is cached but if refs are
# different then there is an extra query per ref
# https://gitlab.com/gitlab-org/gitlab-ce/issues/46368
- expect(recorded.count).to be_within(1).of(38)
+ expect(recorded.count).to be_within(2).of(30)
expect(recorded.cached_count).to eq(0)
end
end