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