Skip to content
Snippets Groups Projects
Commit 8f14d3c1 authored by Shinya Maeda's avatar Shinya Maeda
Browse files

Fix sidekiq memory killer warning message

parent 52af120f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -84,7 +84,7 @@ module Gitlab
end
 
def warn(message, signal: nil)
Sidekiq.logger.warn(class: worker.class, pid: pid, signal: signal, message: message)
Sidekiq.logger.warn(class: worker.class.name, pid: pid, signal: signal, message: message)
end
end
end
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
subject { described_class.new }
let(:pid) { 999 }
 
let(:worker) { double(:worker, class: 'TestWorker') }
let(:worker) { double(:worker, class: ProjectCacheWorker) }
let(:job) { { 'jid' => 123 } }
let(:queue) { 'test_queue' }
 
Loading
Loading
@@ -46,7 +46,10 @@ describe Gitlab::SidekiqMiddleware::MemoryKiller do
expect(Process).to receive(:kill).with('SIGKILL', pid).ordered
 
expect(Sidekiq.logger)
.to receive(:warn).with(class: 'TestWorker', message: anything, pid: pid, signal: anything).at_least(:once)
.to receive(:warn).with(class: 'ProjectCacheWorker',
message: anything,
pid: pid,
signal: anything).at_least(:once)
 
run
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment