Ensure the default loop_interval of 1 second is used until we override it in the individual tests.

This commit is contained in:
Gareth J. Greenaway 2017-12-14 15:22:50 -08:00
parent da91283886
commit e55bc75cbe
No known key found for this signature in database
GPG Key ID: 10B62F8A7CAD7A41
3 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,7 @@ class SchedulerEvalTest(ModuleCase, SaltReturnAssertsMixin):
with patch('salt.utils.schedule.clean_proc_dir', MagicMock(return_value=None)):
functions = {'test.ping': ping}
self.schedule = salt.utils.schedule.Schedule(copy.deepcopy(DEFAULT_CONFIG), functions, returners={})
self.schedule.opts['loop_interval'] = 1
def test_eval(self):
'''
@ -126,6 +127,7 @@ class SchedulerEvalTest(ModuleCase, SaltReturnAssertsMixin):
# Evaluate 1 second at the run time
self.schedule.eval(now=run_time2 + LOOP_INTERVAL)
ret = self.schedule.job_status('job1')
self.assertEqual(ret['_last_run'], run_time2 + LOOP_INTERVAL)

View File

@ -39,6 +39,7 @@ class SchedulerPostponeTest(ModuleCase, SaltReturnAssertsMixin):
with patch('salt.utils.schedule.clean_proc_dir', MagicMock(return_value=None)):
functions = {'test.ping': ping}
self.schedule = salt.utils.schedule.Schedule(copy.deepcopy(DEFAULT_CONFIG), functions, returners={})
self.schedule.opts['loop_interval'] = 1
def test_postpone(self):
'''

View File

@ -42,6 +42,7 @@ class SchedulerSkipTest(ModuleCase, SaltReturnAssertsMixin):
with patch('salt.utils.schedule.clean_proc_dir', MagicMock(return_value=None)):
functions = {'test.ping': ping}
self.schedule = salt.utils.schedule.Schedule(copy.deepcopy(DEFAULT_CONFIG), functions, returners={})
self.schedule.opts['loop_interval'] = 1
def test_skip(self):
'''