Skip to content

Commit 84fdfee

Browse files
committed
responding to code review
1 parent 3379774 commit 84fdfee

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

tests/custom_metric/workflow_test.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212

1313

1414
async 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

0 commit comments

Comments
 (0)