1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Improve schedule test speed

This commit is contained in:
Anton Davydov 2016-01-09 04:27:49 +03:00
parent bf708447c3
commit 1df36bc933

View file

@ -90,7 +90,7 @@ class TestScheduled < Sidekiq::Test
it 'generates random intervals that target a configured average' do
with_sidekiq_option(:poll_interval_average, 10) do
i = 500
intervals = i.times.map{ @poller.send(:random_poll_interval) }
intervals = Array.new(i){ @poller.send(:random_poll_interval) }
assert intervals.all?{|x| x >= 5}
assert intervals.all?{|x| x <= 15}