File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313
1414async def test_custom_metric_workflow (client : Client ):
15- @activity .defn (name = "print_message " )
15+ @activity .defn (name = "print_and_sleep " )
1616 async def print_message_mock ():
1717 global activity_counter
1818 activity_counter += 1
1919
20- async with Worker (
21- client ,
20+ async with Worker (
21+ client ,
22+ task_queue = _TASK_QUEUE ,
23+ workflows = [StartTwoActivitiesWorkflow ],
24+ activities = [print_message_mock ],
25+ ):
26+ result = await client .execute_workflow (
27+ StartTwoActivitiesWorkflow .run ,
28+ id = str (uuid .uuid4 ()),
2229 task_queue = _TASK_QUEUE ,
23- workflows = [StartTwoActivitiesWorkflow ],
24- activities = [print_message_mock ],
25- ):
26- result = await client .execute_workflow (
27- StartTwoActivitiesWorkflow .run ,
28- id = str (uuid .uuid4 ()),
29- task_queue = _TASK_QUEUE ,
30- )
31- assert result is None
32- assert activity_counter == 2
30+ )
31+ assert result is None
32+ assert activity_counter == 2
You can’t perform that action at this time.
0 commit comments