mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Clean up warnings seen with RUBYOPT="-w", fixes #2402
This commit is contained in:
parent
bab47b5c43
commit
bcbe9b258a
7 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,10 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
# Quiet some warnings we see when running in warning mode:
|
||||
# RUBYOPT=-w bundle exec sidekiq
|
||||
$TESTING = false
|
||||
$CELLULOID_DEBUG = false
|
||||
|
||||
require_relative '../lib/sidekiq/cli'
|
||||
|
||||
begin
|
||||
|
|
|
@ -83,7 +83,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def self.done?
|
||||
@done
|
||||
defined? @done
|
||||
end
|
||||
|
||||
def self.strategy
|
||||
|
|
|
@ -45,7 +45,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def display_custom_head
|
||||
return unless @head_html
|
||||
return unless defined?(@head_html)
|
||||
@head_html.map { |block| capture(&block) }.join
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
$CELLULOID_DEBUG = false
|
||||
$TESTING = true
|
||||
require 'coveralls'
|
||||
Coveralls.wear! do
|
||||
|
|
|
@ -354,7 +354,7 @@ class TestRetry < Sidekiq::Test
|
|||
rescue ::StandardError => e1
|
||||
begin
|
||||
raise ::StandardError, 'Error 2'
|
||||
rescue ::StandardError => e2
|
||||
rescue ::StandardError => _
|
||||
raise e1
|
||||
end
|
||||
end
|
||||
|
|
|
@ -98,8 +98,8 @@ class TestScheduled < Sidekiq::Test
|
|||
i = 500
|
||||
intervals = i.times.map{ @poller.send(:random_poll_interval) }
|
||||
|
||||
assert intervals.all?{|i| i >= 5}
|
||||
assert intervals.all?{|i| i <= 15}
|
||||
assert intervals.all?{|x| x >= 5}
|
||||
assert intervals.all?{|x| x <= 15}
|
||||
assert_in_delta 10, intervals.reduce(&:+).to_f / i, 0.5
|
||||
end
|
||||
end
|
||||
|
|
|
@ -292,7 +292,7 @@ class TestWeb < Sidekiq::Test
|
|||
|
||||
get '/queues/default'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match /#{msg['args'][2]}/, last_response.body
|
||||
assert_match(/#{msg['args'][2]}/, last_response.body)
|
||||
end
|
||||
|
||||
it 'calls updatePage() once when polling' do
|
||||
|
|
Loading…
Reference in a new issue