@@ -33,12 +33,7 @@ def basic_engine():
33
33
print ("Starting message queue..." )
34
34
message_queue .start ()
35
35
36
- yield [
37
- api_adapter ,
38
- message_queue ,
39
- message_dispatcher ,
40
- workflow_engine ,
41
- ]
36
+ yield [api_adapter , message_dispatcher ]
42
37
43
38
print ("Stopping message queue..." )
44
39
message_queue .stop ()
@@ -89,7 +84,7 @@ def start_workflow(md, da, workflow_file_name, variables) -> str:
89
84
return r_wfid
90
85
91
86
92
- def wait_for_workflow (da , mq , r_wfid , expect_success = True ):
87
+ def wait_for_workflow (da , r_wfid , expect_success = True ):
93
88
"""A convenience function to wait for and check a workflow execution
94
89
(by inspecting the anticipated DB/API records). The workflow is expected
95
90
to start (because start_workflow() has been called), this function
@@ -121,13 +116,13 @@ def wait_for_workflow(da, mq, r_wfid, expect_success=True):
121
116
122
117
def test_workflow_engine_example_two_step_nop (basic_engine ):
123
118
# Arrange
124
- da , mq , md , _ = basic_engine
119
+ da , md = basic_engine
125
120
126
121
# Act
127
122
r_wfid = start_workflow (md , da , "example-two-step-nop" , {})
128
123
129
124
# Assert
130
- wait_for_workflow (da , mq , r_wfid )
125
+ wait_for_workflow (da , r_wfid )
131
126
# Additional, detailed checks...
132
127
# Check there are the right number of RunningWorkflowStep Records
133
128
# (and they're all set to success/done)
@@ -140,13 +135,13 @@ def test_workflow_engine_example_two_step_nop(basic_engine):
140
135
141
136
def test_workflow_engine_example_nop_fail (basic_engine ):
142
137
# Arrange
143
- da , mq , md , _ = basic_engine
138
+ da , md = basic_engine
144
139
145
140
# Act
146
141
r_wfid = start_workflow (md , da , "example-nop-fail" , {})
147
142
148
143
# Assert
149
- wait_for_workflow (da , mq , r_wfid , expect_success = False )
144
+ wait_for_workflow (da , r_wfid , expect_success = False )
150
145
# Additional, detailed checks...
151
146
# Check we only haver one step, and it failed
152
147
response = da .get_running_workflow_steps (running_workflow_id = r_wfid )
0 commit comments