Skip to content

Commit a8ffca4

Browse files
committed
feat: new sheduling jobs test is added
1 parent 1321d26 commit a8ffca4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

spec/unit/lib/cloud_controller/clock/scheduler_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module VCAP::CloudController
2121
failed_jobs: { frequency_in_seconds: 400, cutoff_age_in_days: 4, max_number_of_failed_delayed_jobs: 10 },
2222
pollable_jobs: { cutoff_age_in_days: 2 },
2323
service_operations_initial_cleanup: { frequency_in_seconds: 600 },
24+
delayed_jobs_recover: { frequency_in_seconds: 600 },
2425
service_usage_events: { cutoff_age_in_days: 5 },
2526
completed_tasks: { cutoff_age_in_days: 6 },
2627
pending_droplets: { frequency_in_seconds: 300, expiration_in_seconds: 600 },
@@ -161,6 +162,12 @@ module VCAP::CloudController
161162
expect(block.call).to be_instance_of(Jobs::Runtime::ServiceOperationsInitialCleanup)
162163
end
163164

165+
expect(clock).to receive(:schedule_frequent_worker_job) do |args, &block|
166+
expect(args).to eql(name: 'delayed_jobs_recover', interval: 600)
167+
expect(Jobs::Runtime::DelayedJobsRecover).to receive(:new).and_call_original
168+
expect(block.call).to be_instance_of(Jobs::Runtime::DelayedJobsRecover)
169+
end
170+
164171
schedule.start
165172
end
166173

0 commit comments

Comments
 (0)