|
30 | 30 | import pytest
|
31 | 31 | from google.protobuf import json_format
|
32 | 32 | from nexusrpc.testing.client import ServiceClient
|
33 |
| -from typing_extensions import Never |
34 | 33 |
|
35 | 34 | import temporalio.api.failure.v1
|
36 | 35 | import temporalio.nexus
|
@@ -72,7 +71,7 @@ class MyService:
|
72 | 71 | # echo_renamed: nexusrpc.Operation[Input, Output] = (
|
73 | 72 | # nexusrpc.Operation(name="echo-renamed")
|
74 | 73 | # )
|
75 |
| - hang: nexusrpc.Operation[Input, Never] |
| 74 | + hang: nexusrpc.Operation[Input, Output] |
76 | 75 | log: nexusrpc.Operation[Input, Output]
|
77 | 76 | async_operation: nexusrpc.Operation[Input, Output]
|
78 | 77 | async_operation_without_type_annotations: nexusrpc.Operation[Input, Output]
|
@@ -129,8 +128,9 @@ async def echo(
|
129 | 128 | @nexusrpc.handler.sync_operation_handler
|
130 | 129 | async def hang(
|
131 | 130 | self, ctx: nexusrpc.handler.StartOperationContext, input: Input
|
132 |
| - ) -> Never: |
| 131 | + ) -> Output: |
133 | 132 | await asyncio.Future()
|
| 133 | + return Output(value="won't reach here") |
134 | 134 |
|
135 | 135 | @nexusrpc.handler.sync_operation_handler
|
136 | 136 | async def non_retryable_application_error(
|
@@ -636,7 +636,7 @@ class UnknownOperation(_FailureTestCase):
|
636 | 636 | status_code=404,
|
637 | 637 | retryable_header=False,
|
638 | 638 | failure_message=lambda s: s.startswith(
|
639 |
| - "Nexus service contract 'MyService' has no operation 'NonExistentOperation'." |
| 639 | + "Nexus service definition 'MyService' has no operation 'NonExistentOperation'." |
640 | 640 | ),
|
641 | 641 | )
|
642 | 642 |
|
|
0 commit comments