@pytest.mark.skip_no_worker()
def test_execute_celery_error_multiple_tasks(app, create_builder):
    (workflow, builder) = create_builder('example', 'CELERY_ERROR_MULTIPLE_TASKS', {})
    assert (workflow['status'] == 'pending')
    result = builder.run()
    with pytest.raises(EncodeError):
        assert result.get()
    time.sleep(0.5)
    with app.app_context():
        task_a = Task.query.filter_by(key='TASK_A').first()
        task_celery_error = Task.query.filter_by(key='TASK_CELERY_ERROR').first()
        workflow = Workflow.query.filter_by(id=task_a.workflow_id).first()
    assert (task_a.status.value == 'success')
    assert (task_celery_error.status.value == 'error')
    assert (workflow.status.value == 'error')
@pytest.mark.skip_no_worker()
def test_execute_celery_error_multiple_tasks(app, create_builder):
    (workflow, builder) = create_builder('example', 'CELERY_ERROR_MULTIPLE_TASKS', {})
    assert (workflow['status'] == 'pending')
    result = builder.run()
    with pytest.raises(EncodeError):
        assert result.get()
    time.sleep(0.5)
    with app.app_context():
        task_a = Task.query.filter_by(key='TASK_A').first()
        task_celery_error = Task.query.filter_by(key='TASK_CELERY_ERROR').first()
        workflow = Workflow.query.filter_by(id=task_a.workflow_id).first()
    assert (task_a.status.value == 'success')
    assert (task_celery_error.status.value == 'error')
    assert (workflow.status.value == 'error')