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
28a00066
Commit
28a00066
authored
Dec 22, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case to improve ci queue metrics coverage
parent
6965339d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
spec/services/ci/register_job_service_spec.rb
spec/services/ci/register_job_service_spec.rb
+11
-0
No files found.
spec/services/ci/register_job_service_spec.rb
View file @
28a00066
...
...
@@ -837,6 +837,7 @@ module Ci
it
'counts job queuing time histogram with expected labels'
do
allow
(
attempt_counter
).
to
receive
(
:increment
)
expect
(
job_queue_duration_seconds
).
to
receive
(
:observe
)
.
with
({
shared_runner:
expected_shared_runner
,
jobs_running_for_project:
expected_jobs_running_for_project_third_job
,
...
...
@@ -888,6 +889,16 @@ module Ci
it_behaves_like
'metrics collector'
end
context
'when max running jobs bucket size is exceeded'
do
before
do
stub_const
(
'Gitlab::Ci::Queue::Metrics::JOBS_RUNNING_FOR_PROJECT_MAX_BUCKET'
,
1
)
end
let
(
:expected_jobs_running_for_project_third_job
)
{
'1+'
}
it_behaves_like
'metrics collector'
end
context
'when pending job with queued_at=nil is used'
do
before
do
pending_job
.
update!
(
queued_at:
nil
)
...
...
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