예제 #1
0
파일: test_swf.py 프로젝트: babbel/floto
def run_17():
    """Test 17
    Activity generates tasks. Tow deciders, one times out.
    """
    result = test_17()
    print_result(result)
    result_activity_6 = get_activity_result(result, 'activity6', 'v1')
    assert set(result_activity_6) == set(['a.in', 'b.in'])
예제 #2
0
def run_17():
    """Test 17
    Activity generates tasks. Tow deciders, one times out.
    """
    result = test_17()
    print_result(result)
    result_activity_6 = get_activity_result(result, 'activity6', 'v1')
    assert set(result_activity_6) == set(['a.in', 'b.in'])
예제 #3
0
파일: test_swf.py 프로젝트: babbel/floto
def run_14():
    """Test 14
    Simple test with child workflow

    """
    result = test_14()
    print_result(result)
    result_cw = get_activity_result(result, 'test_child_workflow', 'v2')
    assert [r for r in result_cw.keys() if 'activity2' in r]
예제 #4
0
def run_07():
    """Test 07
    Timeout

    """
    result = test_07()
    result2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)
    assert result2['status'] == 'finished'
예제 #5
0
파일: test_swf.py 프로젝트: babbel/floto
def run_07():
    """Test 07
    Timeout

    """
    result = test_07()
    result2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)
    assert result2['status'] == 'finished'
예제 #6
0
def run_14():
    """Test 14
    Simple test with child workflow

    """
    result = test_14()
    print_result(result)
    result_cw = get_activity_result(result, 'test_child_workflow', 'v2')
    assert [r for r in result_cw.keys() if 'activity2' in r]
예제 #7
0
def run_08():
    """Test 08
    Repeated Workflow

    """
    result = test_08()
    print_result(result)
    result1 = get_activity_result(result, 'activity1', 'v5')
    assert result1['status'] == 'finished'
예제 #8
0
파일: test_swf.py 프로젝트: babbel/floto
def run_02():
    """Test 02
    Single task without context

    """
    result = test_02()
    result_activity_2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)
    assert result_activity_2['status'] == 'finished'
예제 #9
0
def run_02():
    """Test 02
    Single task without context

    """
    result = test_02()
    result_activity_2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)
    assert result_activity_2['status'] == 'finished'
예제 #10
0
파일: test_swf.py 프로젝트: babbel/floto
def run_08():
    """Test 08
    Repeated Workflow

    """
    result = test_08()
    print_result(result)
    result1 = get_activity_result(result, 'activity1', 'v5')
    assert result1['status'] == 'finished'
예제 #11
0
파일: test_swf.py 프로젝트: babbel/floto
def run_05():
    """Test 05
    Failing task with retry strategy, succeeds after retry

    """
    result = test_05()
    result3 = get_activity_result(result, 'activity_fails_3', 'v2')
    print_result(result)
    assert result3['workflow_input'] == {'foo': 'bar'}
    assert result3['status'] == 'finished'
예제 #12
0
파일: test_swf.py 프로젝트: babbel/floto
def run_13():
    """Test 13
    Two parallel deciders, one of them times out

    """
    result = test_13()
    print_result(result)
    result4 = get_activity_result(result, 'activity4', 'v2')
    assert [r for r in result4.keys() if 'activity1' in r]
    assert [r for r in result4.keys() if 'activity2' in r]
예제 #13
0
def run_09():
    """Test 09
    Repeated Workflow with timer and failing activity with retries

    """
    result = test_09()
    print_result(result)
    result4 = get_activity_result(result, 'activity4', 'v2')
    assert [r for r in result4.keys() if 'activity1' in r]
    assert [r for r in result4.keys() if 'activity2' in r]
예제 #14
0
def run_05():
    """Test 05
    Failing task with retry strategy, succeeds after retry

    """
    result = test_05()
    result3 = get_activity_result(result, 'activity_fails_3', 'v2')
    print_result(result)
    assert result3['workflow_input'] == {'foo': 'bar'}
    assert result3['status'] == 'finished'
예제 #15
0
파일: test_swf.py 프로젝트: babbel/floto
def run_15():
    """Test 15
    Workflow schedules a child workflow.

    """
    result = test_15()
    print_result(result)
    result_child_workflow = get_activity_result(result, 'test_child_workflow', 'v2')
    result_activity = get_activity_result(result_child_workflow, 'activity1', 'v5')
    assert result_activity['status'] == 'finished'
예제 #16
0
def run_13():
    """Test 13
    Two parallel deciders, one of them times out

    """
    result = test_13()
    print_result(result)
    result4 = get_activity_result(result, 'activity4', 'v2')
    assert [r for r in result4.keys() if 'activity1' in r]
    assert [r for r in result4.keys() if 'activity2' in r]
예제 #17
0
파일: test_swf.py 프로젝트: babbel/floto
def run_09():
    """Test 09
    Repeated Workflow with timer and failing activity with retries

    """
    result = test_09()
    print_result(result)
    result4 = get_activity_result(result, 'activity4', 'v2')
    assert [r for r in result4.keys() if 'activity1' in r]
    assert [r for r in result4.keys() if 'activity2' in r]
예제 #18
0
파일: test_swf.py 프로젝트: babbel/floto
def run_16():
    """Test 16
    Failing Task in ChildWorkflow

    """
    result = test_16()
    print_result(result)
    result_child_workflow = get_activity_result(result, 'test_child_workflow', 'v2')
    result_activity = get_activity_result(result_child_workflow, 'activity_fails_2', 'v2')
    assert result_activity == 'Something went wrong'
예제 #19
0
파일: test_swf.py 프로젝트: babbel/floto
def run_01():
    """
    Test 01
    Single task with context

    """
    result = test_01()
    result_activity_1 = get_activity_result(result, 'activity1', 'v5')
    print_result(result)
    assert result_activity_1['workflow'] == {'foo': 'bar'}
    assert result_activity_1['status'] == 'finished'
예제 #20
0
def run_01():
    """
    Test 01
    Single task with context

    """
    result = test_01()
    result_activity_1 = get_activity_result(result, 'activity1', 'v5')
    print_result(result)
    assert result_activity_1['workflow'] == {'foo': 'bar'}
    assert result_activity_1['status'] == 'finished'
예제 #21
0
def run_04():
    """Test 04
    Two tasks with 1 -> 3

    """
    result = test_04()
    result3 = get_activity_result(result, 'activity3', 'v2')
    print_result(result)

    assert result3['activity1']['status'] == 'finished'
    assert result3['activity1']['workflow'] == {'foo': 'bar'}
    assert result3['status'] == 'finished'
예제 #22
0
def run_16():
    """Test 16
    Failing Task in ChildWorkflow

    """
    result = test_16()
    print_result(result)
    result_child_workflow = get_activity_result(result, 'test_child_workflow',
                                                'v2')
    result_activity = get_activity_result(result_child_workflow,
                                          'activity_fails_2', 'v2')
    assert result_activity == 'Something went wrong'
예제 #23
0
def run_15():
    """Test 15
    Workflow schedules a child workflow.

    """
    result = test_15()
    print_result(result)
    result_child_workflow = get_activity_result(result, 'test_child_workflow',
                                                'v2')
    result_activity = get_activity_result(result_child_workflow, 'activity1',
                                          'v5')
    assert result_activity['status'] == 'finished'
예제 #24
0
파일: test_swf.py 프로젝트: babbel/floto
def run_04():
    """Test 04
    Two tasks with 1 -> 3

    """
    result = test_04()
    result3 = get_activity_result(result, 'activity3', 'v2')
    print_result(result)

    assert result3['activity1']['status'] == 'finished'
    assert result3['activity1']['workflow'] == {'foo': 'bar'}
    assert result3['status'] == 'finished'
예제 #25
0
def run_03():
    """Test 03
    Two tasks without dependency, run in parallel if > 1 worker

    """
    result = test_03()
    result1 = get_activity_result(result, 'activity1', 'v5')
    result2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)

    assert result1['workflow'] == {'foo': 'bar'}
    assert result1['status'] == 'finished'
    assert result2['status'] == 'finished'
예제 #26
0
파일: test_swf.py 프로젝트: babbel/floto
def run_03():
    """Test 03
    Two tasks without dependency, run in parallel if > 1 worker

    """
    result = test_03()
    result1 = get_activity_result(result, 'activity1', 'v5')
    result2 = get_activity_result(result, 'activity2', 'v4')
    print_result(result)

    assert result1['workflow'] == {'foo': 'bar'}
    assert result1['status'] == 'finished'
    assert result2['status'] == 'finished'