1313from  tests .helpers .nexus  import  create_nexus_endpoint , make_nexus_endpoint_name 
1414
1515
16+ @nexusrpc .service  
17+ class  Service :
18+     op_that_never_returns : nexusrpc .Operation [None , None ]
19+ 
20+ 
1621@nexusrpc .handler .service_handler  
17- class  NexusService :
22+ class  ServiceHandler :
1823    @nexusrpc .handler .sync_operation  
1924    async  def  op_that_never_returns (
2025        self , _ctx : nexusrpc .handler .StartOperationContext , id : None 
@@ -28,10 +33,10 @@ class NexusCallerWorkflow:
2833    async  def  run (self ) ->  None :
2934        nexus_client  =  workflow .create_nexus_client (
3035            endpoint = make_nexus_endpoint_name (workflow .info ().task_queue ),
31-             service = NexusService ,
36+             service = ServiceHandler ,
3237        )
3338        await  nexus_client .execute_operation (
34-             NexusService .op_that_never_returns ,
39+             Service .op_that_never_returns ,
3540            None ,
3641            schedule_to_close_timeout = timedelta (seconds = 10 ),
3742        )
@@ -44,7 +49,7 @@ async def test_nexus_timeout(env: WorkflowEnvironment):
4449    async  with  new_worker (
4550        env .client ,
4651        NexusCallerWorkflow ,
47-         nexus_service_handlers = [NexusService ()],
52+         nexus_service_handlers = [ServiceHandler ()],
4853    ) as  worker :
4954        await  create_nexus_endpoint (worker .task_queue , env .client )
5055
0 commit comments