mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 00:26:07 +10:00
Without this it's impossible to find out what methods/views/queries are executed by a certain controller or Sidekiq worker. While this will increase the total number of series it should stay within reasonable limits due to the amount of "actions" being small enough.
20 lines
521 B
Ruby
20 lines
521 B
Ruby
require 'spec_helper'
|
|
|
|
describe Gitlab::Metrics::SidekiqMiddleware do
|
|
let(:middleware) { described_class.new }
|
|
|
|
describe '#call' do
|
|
it 'tracks the transaction' do
|
|
worker = double(:worker, class: double(:class, name: 'TestWorker'))
|
|
|
|
expect(Gitlab::Metrics::Transaction).to receive(:new).
|
|
with('TestWorker#perform').
|
|
and_call_original
|
|
|
|
expect_any_instance_of(Gitlab::Metrics::Transaction).to receive(:finish)
|
|
|
|
middleware.call(worker, 'test', :test) { nil }
|
|
end
|
|
end
|
|
end
|