Commit 9360f37a authored by Pawel Chojnacki's avatar Pawel Chojnacki

Fix Rubocop warnings

parent b90bf88b
...@@ -50,7 +50,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do ...@@ -50,7 +50,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
it 'adds a metric containing garbage collection time statistics' do it 'adds a metric containing garbage collection time statistics' do
expect(GC::Profiler).to receive(:total_time).and_return(0.24) expect(GC::Profiler).to receive(:total_time).and_return(0.24)
expect(sampler.metrics[:total_time]).to receive(:set) expect(sampler.metrics[:total_time]).to receive(:set)
.with({}, 240) .with({}, 240)
.and_call_original .and_call_original
...@@ -81,7 +80,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do ...@@ -81,7 +80,6 @@ describe Gitlab::Metrics::Samplers::RubySampler do
it 'ignores classes without a name' do it 'ignores classes without a name' do
expect(Allocations).to receive(:to_hash).and_return({ Class.new => 4 }) expect(Allocations).to receive(:to_hash).and_return({ Class.new => 4 })
expect(sampler.metrics[:objects_total]).not_to receive(:set) expect(sampler.metrics[:objects_total]).not_to receive(:set)
.with(include(class: 'object_counts'), anything) .with(include(class: 'object_counts'), anything)
......
...@@ -32,7 +32,6 @@ describe Gitlab::Metrics::Subscribers::ActionView do ...@@ -32,7 +32,6 @@ describe Gitlab::Metrics::Subscribers::ActionView do
end end
it 'observes view rendering time' do it 'observes view rendering time' do
expect(described_class.metric_view_rendering_duration_seconds) expect(described_class.metric_view_rendering_duration_seconds)
.to receive(:observe) .to receive(:observe)
.with({ view: 'app/views/x.html.haml' }, 2.1) .with({ view: 'app/views/x.html.haml' }, 2.1)
......
...@@ -210,7 +210,7 @@ describe Gitlab::Metrics::Subscribers::RailsCache do ...@@ -210,7 +210,7 @@ describe Gitlab::Metrics::Subscribers::RailsCache do
it 'observes cache metric' do it 'observes cache metric' do
expect(described_class.metric_cache_operation_duration_seconds) expect(described_class.metric_cache_operation_duration_seconds)
.to receive(:observe) .to receive(:observe)
.with(transaction.labels.merge(operation: :delete), event.duration/1000.0) .with(transaction.labels.merge(operation: :delete), event.duration / 1000.0)
subscriber.observe(:delete, event.duration) subscriber.observe(:delete, event.duration)
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