Use different query count expectations in EE

This commit is contained in:
Matija Čupić 2019-04-10 13:18:31 +02:00
parent 2238b12df9
commit 60f0e3c993
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 4 additions and 2 deletions

View File

@ -157,7 +157,8 @@ describe PipelineSerializer do
it 'verifies number of queries', :request_store do
recorded = ActiveRecord::QueryRecorder.new { subject }
expect(recorded.count).to be_within(2).of(31)
expected_queries = Gitlab.ee? ? 38 : 31
expect(recorded.count).to be_within(2).of(expected_queries)
expect(recorded.cached_count).to eq(0)
end
end
@ -176,7 +177,8 @@ 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(2).of(38)
expected_queries = Gitlab.ee? ? 44 : 38
expect(recorded.count).to be_within(2).of(expected_queries)
expect(recorded.cached_count).to eq(0)
end
end