BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cba965eb
Commit
cba965eb
authored
May 05, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set minimum latency to be non-negative number.
Sometimes the tests run so fast latency is calculated as 0. This causes transient failures in our CI.
parent
07eac529
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
fs_shards_check_spec.rb
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
+6
-6
simple_check_shared.rb
spec/lib/gitlab/health_checks/simple_check_shared.rb
+3
-3
No files found.
spec/lib/gitlab/health_checks/fs_shards_check_spec.rb
View file @
cba965eb
...
...
@@ -82,9 +82,9 @@ describe Gitlab::HealthChecks::FsShardsCheck do
it
{
is_expected
.
to
include
(
metric_class
.
new
(
:filesystem_readable
,
0
,
shard: :default
))
}
it
{
is_expected
.
to
include
(
metric_class
.
new
(
:filesystem_writable
,
0
,
shard: :default
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_access_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_read_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_write_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_access_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_read_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_write_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
end
context
'storage points to directory that has both read and write rights'
do
...
...
@@ -96,9 +96,9 @@ describe Gitlab::HealthChecks::FsShardsCheck do
it
{
is_expected
.
to
include
(
metric_class
.
new
(
:filesystem_readable
,
1
,
shard: :default
))
}
it
{
is_expected
.
to
include
(
metric_class
.
new
(
:filesystem_writable
,
1
,
shard: :default
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_access_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_read_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_write_latency
,
value:
be
>
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_access_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_read_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name: :filesystem_write_latency
,
value:
be
>
=
0
,
labels:
{
shard: :default
}))
}
end
end
end
...
...
spec/lib/gitlab/health_checks/simple_check_shared.rb
View file @
cba965eb
...
...
@@ -8,7 +8,7 @@ shared_context 'simple_check' do |metrics_prefix, check_name, success_result|
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_success"
,
value:
1
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_timeout"
,
value:
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
=
0
))
}
end
context
'Check is misbehaving'
do
...
...
@@ -18,7 +18,7 @@ shared_context 'simple_check' do |metrics_prefix, check_name, success_result|
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_success"
,
value:
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_timeout"
,
value:
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
=
0
))
}
end
context
'Check is timeouting'
do
...
...
@@ -28,7 +28,7 @@ shared_context 'simple_check' do |metrics_prefix, check_name, success_result|
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_success"
,
value:
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_timeout"
,
value:
1
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
0
))
}
it
{
is_expected
.
to
include
(
have_attributes
(
name:
"
#{
metrics_prefix
}
_latency"
,
value:
be
>
=
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