Fix flaky time related spec

Also removes test from quarantine
This commit is contained in:
Heinrich Lee Yu 2019-06-18 08:07:23 +08:00
parent 04307096bc
commit b0e7efb5c2
1 changed files with 4 additions and 2 deletions

View File

@ -128,10 +128,12 @@ describe Ci::PipelineSchedule do
context 'when pipeline schedule runs every minute' do context 'when pipeline schedule runs every minute' do
let(:pipeline_schedule) { create(:ci_pipeline_schedule, :every_minute) } let(:pipeline_schedule) { create(:ci_pipeline_schedule, :every_minute) }
it "updates next_run_at to the sidekiq worker's execution time", :quarantine do it "updates next_run_at to the sidekiq worker's execution time" do
Timecop.freeze do
expect(pipeline_schedule.next_run_at).to eq(cron_worker_next_run_at) expect(pipeline_schedule.next_run_at).to eq(cron_worker_next_run_at)
end end
end end
end
context 'when there are two different pipeline schedules in different time zones' do context 'when there are two different pipeline schedules in different time zones' do
let(:pipeline_schedule_1) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'Eastern Time (US & Canada)') } let(:pipeline_schedule_1) { create(:ci_pipeline_schedule, :weekly, cron_timezone: 'Eastern Time (US & Canada)') }