mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Ensure the default loop_interval of 1 second is used until we override it in the individual tests.
This commit is contained in:
parent
da91283886
commit
e55bc75cbe
@ -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)
|
||||
|
||||
|
@ -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):
|
||||
'''
|
||||
|
@ -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):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user