Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-20 22:09:04 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-21 13:06:10 +0300
commit3683d2d251889865334f861791e5e743dca48898 (patch)
treed17ab39389c1e9e009a0a9e7854aa8dcf7cfaab3 /spec
parentc2cbfc5c4afbe8385659f97769db8450284639cf (diff)
Perform cheap thread find
If we process message that is not designated to us previously we would fire a separate Thread for that. We don't need to do it. We can cheaply check if thread is available, if it is, we can perform expensive operation then.
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/sidekiq_monitor_spec.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/lib/gitlab/sidekiq_monitor_spec.rb b/spec/lib/gitlab/sidekiq_monitor_spec.rb
index 7c9fc598b02..f1804bd0755 100644
--- a/spec/lib/gitlab/sidekiq_monitor_spec.rb
+++ b/spec/lib/gitlab/sidekiq_monitor_spec.rb
@@ -145,9 +145,7 @@ describe Gitlab::SidekiqMonitor do
context 'when jid is not found' do
it 'does not log cancellation message' do
expect(Sidekiq.logger).not_to receive(:warn)
- expect(subject).to be_a(Thread)
-
- subject.join
+ expect(subject).to be_nil
end
end