summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/sidekiq_daemon
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 09:07:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 09:07:51 +0000
commit914ea32e0efca21436220df2c10e1bfbe4ed3da9 (patch)
treee8eb3b97aea2006bd863c586b7ec41d51f654b3b /spec/lib/gitlab/sidekiq_daemon
parent3546e1bb0971347e9e9984de0799e3fb53743b33 (diff)
downloadgitlab-ce-914ea32e0efca21436220df2c10e1bfbe4ed3da9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/sidekiq_daemon')
-rw-r--r--spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb8
-rw-r--r--spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb8
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
index 263cc821c1a..adea2ba30b3 100644
--- a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
+++ b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
@@ -12,8 +12,8 @@ describe Gitlab::SidekiqDaemon::MemoryKiller do
allow(Sidekiq.logger).to receive(:warn)
end
- describe '#start_working' do
- subject { memory_killer.send(:start_working) }
+ describe '#run_thread' do
+ subject { memory_killer.send(:run_thread) }
before do
# let enabled? return 3 times: true, true, false
@@ -37,7 +37,7 @@ describe Gitlab::SidekiqDaemon::MemoryKiller do
.with(
class: described_class.to_s,
pid: pid,
- message: "Exception from start_working: My Exception")
+ message: "Exception from run_thread: 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)
@@ -50,7 +50,7 @@ describe Gitlab::SidekiqDaemon::MemoryKiller do
.with(
class: described_class.to_s,
pid: pid,
- message: "Exception from start_working: My Exception")
+ message: "Exception from run_thread: My Exception")
expect(memory_killer).to receive(:rss_within_range?).once.and_raise(Exception, 'My Exception')
diff --git a/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb b/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
index 397098ed5a4..3f49ef0e9a7 100644
--- a/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
+++ b/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
@@ -37,8 +37,8 @@ describe Gitlab::SidekiqDaemon::Monitor do
end
end
- describe '#start_working when notification channel not enabled' do
- subject { monitor.send(:start_working) }
+ describe '#run_thread when notification channel not enabled' do
+ subject { monitor.send(:run_thread) }
it 'return directly' do
allow(monitor).to receive(:notification_channel_enabled?).and_return(nil)
@@ -52,8 +52,8 @@ describe Gitlab::SidekiqDaemon::Monitor do
end
end
- describe '#start_working when notification channel enabled' do
- subject { monitor.send(:start_working) }
+ describe '#run_thread when notification channel enabled' do
+ subject { monitor.send(:run_thread) }
before do
# we want to run at most once cycle