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
15fd6908
Commit
15fd6908
authored
Jul 21, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile time warnings for unused variables
It fixes: warning: assigned but unused variable - VAR
parent
989a09fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
ee/lib/status_page/storage/s3_client.rb
ee/lib/status_page/storage/s3_client.rb
+1
-1
lib/gitlab/ci/reports/test_reports.rb
lib/gitlab/ci/reports/test_reports.rb
+1
-3
spec/lib/gitlab/job_waiter_spec.rb
spec/lib/gitlab/job_waiter_spec.rb
+2
-4
No files found.
ee/lib/status_page/storage/s3_client.rb
View file @
15fd6908
...
...
@@ -57,7 +57,7 @@ module StatusPage
# Return a Set of all keys with a given prefix
def
list_object_keys
(
prefix
)
wrap_errors
(
prefix:
prefix
)
do
list_objects
(
prefix
).
reduce
(
Set
.
new
)
do
|
objects
,
(
response
,
index
)
|
list_objects
(
prefix
).
reduce
(
Set
.
new
)
do
|
objects
,
(
response
,
_
index
)
|
break
objects
if
objects
.
size
>=
StatusPage
::
Storage
::
MAX_UPLOADS
objects
|
response
.
contents
.
map
(
&
:key
)
...
...
lib/gitlab/ci/reports/test_reports.rb
View file @
15fd6908
...
...
@@ -43,9 +43,7 @@ module Gitlab
end
def
suite_errors
test_suites
.
each_with_object
({})
do
|
(
name
,
suite
),
errors
|
errors
[
suite
.
name
]
=
suite
.
suite_error
if
suite
.
suite_error
end
test_suites
.
transform_values
(
&
:suite_error
).
compact
end
TestCase
::
STATUS_TYPES
.
each
do
|
status_type
|
...
...
spec/lib/gitlab/job_waiter_spec.rb
View file @
15fd6908
...
...
@@ -60,16 +60,14 @@ RSpec.describe Gitlab::JobWaiter do
described_class
.
notify
(
waiter
.
key
,
'a'
)
described_class
.
notify
(
waiter
.
key
,
'b'
)
result
=
nil
expect
{
Timeout
.
timeout
(
1
)
{
result
=
waiter
.
wait
(
2
)
}
}.
not_to
raise_error
expect
{
Timeout
.
timeout
(
1
)
{
waiter
.
wait
(
2
)
}
}.
not_to
raise_error
end
it
'increments job_waiter_started_total and job_waiter_timeouts_total when it times out'
do
expect
(
started_total
).
to
receive
(
:increment
).
with
(
worker:
'Foo'
)
expect
(
timeouts_total
).
to
receive
(
:increment
).
with
(
worker:
'Foo'
)
result
=
nil
expect
{
Timeout
.
timeout
(
2
)
{
result
=
waiter
.
wait
(
1
)
}
}.
not_to
raise_error
expect
{
Timeout
.
timeout
(
2
)
{
waiter
.
wait
(
1
)
}
}.
not_to
raise_error
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