Beispiel #1
0
def test__start_job_update_with_pulse(client):
    req = get_job_update_request('test_dc_labrat_pulsed.yaml')
    res = client.start_job_update(req,
                                  'start pulsed job update test/dc/labrat')
    assert get_update_status(client, res.key) == \
        api.JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE

    client.pulse_job_update(res.key)
    wait_for_update_status(
        client, res.key, {
            api.JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE,
            api.JobUpdateStatus.ROLLING_FORWARD,
        }, api.JobUpdateStatus.ROLLED_FORWARD)
Beispiel #2
0
def test__pulsed_update_abort(client):
    """
    Create a pulse update, and then abort it
    """
    req = get_job_update_request('test_dc_labrat_pulsed.yaml')
    res = client.start_job_update(req,
                                  'start pulsed job update test/dc/labrat')
    assert get_update_status(client, res.key) == \
        api.JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE
    key = res.key

    client.abort_job_update(key, 'abort update')
    wait_for_update_status(client, key,
                           {api.JobUpdateStatus.ROLL_FORWARD_AWAITING_PULSE},
                           api.JobUpdateStatus.ABORTED)