Clean up Redis after each test.
This commit is contained in:
parent
22e567c9b9
commit
bb92be5784
|
@ -75,8 +75,6 @@ describe Scheduler::Manager do
|
|||
end
|
||||
|
||||
before do
|
||||
$redis.del manager.class.lock_key
|
||||
$redis.del manager.class.queue_key
|
||||
manager.remove(Testing::RandomJob)
|
||||
manager.remove(Testing::SuperLongJob)
|
||||
manager.remove(Testing::PerHostJob)
|
||||
|
@ -87,6 +85,7 @@ describe Scheduler::Manager do
|
|||
manager.remove(Testing::RandomJob)
|
||||
manager.remove(Testing::SuperLongJob)
|
||||
manager.remove(Testing::PerHostJob)
|
||||
$redis.flushall
|
||||
end
|
||||
|
||||
describe 'per host jobs' do
|
||||
|
|
|
@ -20,11 +20,11 @@ describe Scheduler::ScheduleInfo do
|
|||
before do
|
||||
@info = manager.schedule_info(RandomJob)
|
||||
@info.del!
|
||||
$redis.del manager.class.queue_key
|
||||
end
|
||||
|
||||
after do
|
||||
manager.stop!
|
||||
$redis.del manager.class.queue_key
|
||||
end
|
||||
|
||||
it "is a scheduled job" do
|
||||
|
@ -67,11 +67,11 @@ describe Scheduler::ScheduleInfo do
|
|||
before do
|
||||
@info = manager.schedule_info(DailyJob)
|
||||
@info.del!
|
||||
$redis.del manager.class.queue_key
|
||||
end
|
||||
|
||||
after do
|
||||
manager.stop!
|
||||
$redis.del manager.class.queue_key
|
||||
end
|
||||
|
||||
it "is a scheduled job" do
|
||||
|
|
Loading…
Reference in New Issue