Commit 0baf75ed authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'pl-fix-compile-warnings' into 'master'

Fix some compile time warnings

See merge request gitlab-org/gitlab!37440
parents 95e20330 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)
......
......@@ -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|
......
......@@ -87,7 +87,7 @@ module QA
repository.init_repository
expect { repository.pull(repository_uri_ssh, branch_name) }
.to raise_error(QA::Git::Repository::RepositoryCommandError, /[fatal: Could not read from remote repository.]+/)
.to raise_error(QA::Git::Repository::RepositoryCommandError, /fatal: Could not read from remote repository\./)
end
end
......
......@@ -86,7 +86,7 @@ module QA
repository.init_repository
expect { repository.pull(repository_uri_ssh, branch_name) }
.to raise_error(QA::Git::Repository::RepositoryCommandError, /[fatal: Could not read from remote repository.]+/)
.to raise_error(QA::Git::Repository::RepositoryCommandError, /fatal: Could not read from remote repository\./)
end
end
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment