jobcontrol.utils.testing¶
- jobcontrol.utils.testing.testing_job(progress_steps=None, retval=None, fail=False, skip=False, log_messages=None, step_duration=0)[source]¶
Job used for testing purposes.
Parameters: - progress_steps –
A list of tuples: (<group_name>, <steps>), where “group_name” is a tuple of name “levels”, “steps” an integer representing how many steps should that level have.
Progress reports will be sent in randomized order.
- retval – The return value for the job.
- fail – Whether this job should fail.
- skip – Whether this job should be skipped.
- log_messages – A list of tuples: (level, message)
- step_duration – The time to sleep between steps, in milliseconds.
- progress_steps –
- jobcontrol.utils.testing.job_failing_once()[source]¶
This job will fail exactly once; retry will be successful
- jobcontrol.utils.testing.job_echo_config(*args, **kwargs)[source]¶
Simple job, “echoing” back the current configuration.