diff options
Diffstat (limited to 'spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb index 756c7947df0..263cc821c1a 100644 --- a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb +++ b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb @@ -40,6 +40,7 @@ describe Gitlab::SidekiqDaemon::MemoryKiller do message: "Exception from start_working: My Exception") expect(memory_killer).to receive(:rss_within_range?).twice.and_raise(StandardError, 'My Exception') + expect(memory_killer).to receive(:sleep).twice.with(Gitlab::SidekiqDaemon::MemoryKiller::CHECK_INTERVAL_SECONDS) expect { subject }.not_to raise_exception end @@ -53,6 +54,7 @@ describe Gitlab::SidekiqDaemon::MemoryKiller do expect(memory_killer).to receive(:rss_within_range?).once.and_raise(Exception, 'My Exception') + expect(memory_killer).to receive(:sleep).with(Gitlab::SidekiqDaemon::MemoryKiller::CHECK_INTERVAL_SECONDS) expect(Sidekiq.logger).to receive(:warn).once .with( class: described_class.to_s, |