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'])
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]
def run_07(): """Test 07 Timeout """ result = test_07() result2 = get_activity_result(result, 'activity2', 'v4') print_result(result) assert result2['status'] == 'finished'
def run_08(): """Test 08 Repeated Workflow """ result = test_08() print_result(result) result1 = get_activity_result(result, 'activity1', 'v5') assert result1['status'] == 'finished'
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'
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'
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]
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]
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'
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'
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'
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'
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'