Skip to content

Commit

Permalink
Remove spurious asyncio.gather calls in test
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Jun 25, 2024
1 parent caed0ff commit 97fc45f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/worker/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5338,21 +5338,17 @@ async def _get_workflow_result(
if unfinished_policy:
handler_name += f"_{unfinished_policy.name}"
if self.handler_type == "signal":
await asyncio.gather(handle.signal(handler_name))
await handle.signal(handler_name)
else:
if not wait_all_handlers_finished:
with pytest.raises(RPCError) as err:
await asyncio.gather(
handle.execute_update(handler_name, id="my-update")
)
await handle.execute_update(handler_name, id="my-update")
assert (
err.value.status == RPCStatusCode.NOT_FOUND
and "workflow execution already completed" in str(err.value).lower()
)
else:
await asyncio.gather(
handle.execute_update(handler_name, id="my-update")
)
await handle.execute_update(handler_name, id="my-update")

return await handle.result()

Expand Down

0 comments on commit 97fc45f

Please sign in to comment.