diff options
author | Stan Hu <stanhu@gmail.com> | 2019-07-31 16:04:46 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-31 16:04:46 +0300 |
commit | 7bab7b6993edbaf0d1fa2dfce315563dad676a44 (patch) | |
tree | d74854572a06dd0c16c052683cfa0d59ac2e5baa /spec/lib | |
parent | f10295b2956665d351eb413d380673090cb13b24 (diff) | |
parent | 8f14d3c1401088a61a2360b9ad988807f944bd79 (diff) |
Merge branch 'fix-sidekiq-memory-killer-warn-message' into 'master'
Fix sidekiq memory killer warning message
Closes gitlab-com/gl-infra/infrastructure#7371
See merge request gitlab-org/gitlab-ce!31264
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb index b451844f06c..1de9a644610 100644 --- a/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb +++ b/spec/lib/gitlab/sidekiq_middleware/memory_killer_spec.rb @@ -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' } @@ -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 |