Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bc9a0e10
Commit
bc9a0e10
authored
May 23, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce amount of expected pipeline serialization queries in specs
parent
92de5f77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+1
-1
spec/serializers/pipeline_serializer_spec.rb
spec/serializers/pipeline_serializer_spec.rb
+2
-2
No files found.
spec/controllers/projects/pipelines_controller_spec.rb
View file @
bc9a0e10
...
...
@@ -36,7 +36,7 @@ describe Projects::PipelinesController do
expect
(
json_response
[
'count'
][
'running'
]).
to
eq
'1'
expect
(
json_response
[
'count'
][
'pending'
]).
to
eq
'1'
expect
(
json_response
[
'count'
][
'finished'
]).
to
eq
'2'
expect
(
queries
.
count
).
to
be
_within
(
2
).
of
(
29
)
expect
(
queries
.
count
).
to
be
<
30
end
it
'does not include coverage data for the pipelines'
do
...
...
spec/serializers/pipeline_serializer_spec.rb
View file @
bc9a0e10
...
...
@@ -120,7 +120,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
(
44
)
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
38
)
expect
(
recorded
.
cached_count
).
to
eq
(
0
)
end
end
...
...
@@ -139,7 +139,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
(
51
)
expect
(
recorded
.
count
).
to
be_within
(
1
).
of
(
45
)
expect
(
recorded
.
cached_count
).
to
eq
(
0
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment