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
9c4df81b
Commit
9c4df81b
authored
Dec 08, 2021
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure we don't track apdex for failing queries
parent
03b07391
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
spec/lib/gitlab/graphql/tracers/metrics_tracer_spec.rb
spec/lib/gitlab/graphql/tracers/metrics_tracer_spec.rb
+10
-2
No files found.
spec/lib/gitlab/graphql/tracers/metrics_tracer_spec.rb
View file @
9c4df81b
# frozen_string_literal: true
require
'
fast_
spec_helper'
require
'spec_helper'
require
'rspec-parameterized'
require
"support/graphql/fake_query_type"
...
...
@@ -36,7 +36,7 @@ RSpec.describe Gitlab::Graphql::Tracers::MetricsTracer do
end
with_them
do
it
'increments sli'
do
it
'increments
apdex
sli'
do
# Trigger initialization
fake_schema
...
...
@@ -56,5 +56,13 @@ RSpec.describe Gitlab::Graphql::Tracers::MetricsTracer do
fake_schema
.
execute
(
"query lorem { helloWorld }"
)
end
end
it
"does not record apdex for failing queries"
do
query_string
=
"query fooOperation { breakingField }"
expect
(
Gitlab
::
Metrics
::
RailsSlis
.
graphql_query_apdex
).
not_to
receive
(
:increment
)
expect
{
fake_schema
.
execute
(
query_string
)
}.
to
raise_error
(
/This field is supposed to break/
)
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