unhack spec

This commit is contained in:
Sam 2014-08-19 20:57:34 +10:00
parent b160882ef2
commit 85317e7658
1 changed files with 4 additions and 22 deletions

View File

@ -3,27 +3,9 @@ require_dependency 'sidekiq/pausable'
describe Sidekiq do
it "can pause and unpause" do
# Temporary work around
t = Thread.new do
Sidekiq.pause!
Sidekiq.paused?.should == true
Sidekiq.unpause!
Sidekiq.paused?.should == false
end
t2 = Thread.new do
sleep 5
t.kill
end
t.join
if t2.alive?
t2.kill
else
raise "Timed out running sidekiq pause test"
end
Sidekiq.pause!
Sidekiq.paused?.should == true
Sidekiq.unpause!
Sidekiq.paused?.should == false
end
end