Skip to content

Commit 044ad4a

Browse files
committed
Fail workflow instead of task in tests
1 parent 6cd317e commit 044ad4a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/worker/test_nexus.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ async def test_sync_response(
392392
workflows=[CallerWorkflow, HandlerWorkflow],
393393
task_queue=task_queue,
394394
workflow_runner=UnsandboxedWorkflowRunner(),
395+
workflow_failure_exception_types=[Exception],
395396
):
396397
await create_nexus_endpoint(task_queue, client)
397398
caller_wf_handle = await client.start_workflow(
@@ -442,6 +443,7 @@ async def test_async_response(
442443
workflows=[CallerWorkflow, HandlerWorkflow],
443444
task_queue=task_queue,
444445
workflow_runner=UnsandboxedWorkflowRunner(),
446+
workflow_failure_exception_types=[Exception],
445447
):
446448
caller_wf_handle, handler_wf_handle = await _start_wf_and_nexus_op(
447449
client, task_queue, request_cancel, op_definition_type, caller_reference
@@ -569,6 +571,7 @@ async def test_untyped_caller(
569571
nexus_services=[ServiceImpl()],
570572
task_queue=task_queue,
571573
workflow_runner=UnsandboxedWorkflowRunner(),
574+
workflow_failure_exception_types=[Exception],
572575
):
573576
await create_nexus_endpoint(task_queue, client)
574577
caller_wf_handle = await client.start_workflow(
@@ -720,6 +723,7 @@ async def test_service_interface_and_implementation_names(client: Client):
720723
workflows=[ServiceInterfaceAndImplCallerWorkflow],
721724
task_queue=task_queue,
722725
workflow_runner=UnsandboxedWorkflowRunner(),
726+
workflow_failure_exception_types=[Exception],
723727
):
724728
await create_nexus_endpoint(task_queue, client)
725729
assert await client.execute_workflow(

0 commit comments

Comments
 (0)