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
e7498166
Commit
e7498166
authored
Jul 09, 2020
by
Micael Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the N+1 thresholds in the spec
parent
9eb5ebf9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
ee/spec/requests/api/search_spec.rb
ee/spec/requests/api/search_spec.rb
+5
-7
No files found.
ee/spec/requests/api/search_spec.rb
View file @
e7498166
...
@@ -80,8 +80,7 @@ RSpec.describe API::Search do
...
@@ -80,8 +80,7 @@ RSpec.describe API::Search do
ensure_elasticsearch_index!
ensure_elasticsearch_index!
# Some N+1 queries still exist
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'merge_requests'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
)
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'merge_requests'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
.
count
+
16
)
end
end
end
end
...
@@ -125,7 +124,7 @@ RSpec.describe API::Search do
...
@@ -125,7 +124,7 @@ RSpec.describe API::Search do
ensure_elasticsearch_index!
ensure_elasticsearch_index!
# Some N+1 queries still exist
# Some N+1 queries still exist
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'commits'
,
search:
'folder'
}
}.
not_to
exceed_query_limit
(
control
.
count
+
9
)
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'commits'
,
search:
'folder'
}
}.
not_to
exceed_query_limit
(
control
).
with_threshold
(
9
)
end
end
end
end
...
@@ -187,8 +186,7 @@ RSpec.describe API::Search do
...
@@ -187,8 +186,7 @@ RSpec.describe API::Search do
ensure_elasticsearch_index!
ensure_elasticsearch_index!
# Some N+1 queries still exist
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'issues'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
)
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'issues'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
.
count
+
2
)
end
end
it_behaves_like
'pagination'
,
scope:
'issues'
it_behaves_like
'pagination'
,
scope:
'issues'
...
@@ -213,7 +211,7 @@ RSpec.describe API::Search do
...
@@ -213,7 +211,7 @@ RSpec.describe API::Search do
ensure_elasticsearch_index!
ensure_elasticsearch_index!
# Some N+1 queries still exist
# Some N+1 queries still exist
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'projects'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
.
count
+
4
)
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'projects'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
).
with_threshold
(
4
)
end
end
end
end
end
end
...
@@ -234,7 +232,7 @@ RSpec.describe API::Search do
...
@@ -234,7 +232,7 @@ RSpec.describe API::Search do
ensure_elasticsearch_index!
ensure_elasticsearch_index!
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'milestones'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
.
count
)
expect
{
get
api
(
endpoint
,
user
),
params:
{
scope:
'milestones'
,
search:
'*'
}
}.
not_to
exceed_query_limit
(
control
)
end
end
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