@@ -343,7 +343,6 @@ def child(ctx: task.OrchestrationContext, _):
343343 assert state is None
344344
345345
346- @pytest .mark .skip (reason = "durabletask-go does not yet support RestartInstance" )
347346def test_restart_with_same_instance_id ():
348347 def orchestrator (ctx : task .OrchestrationContext , _ ):
349348 result = yield ctx .call_activity (say_hello , input = "World" )
@@ -353,12 +352,12 @@ def say_hello(ctx: task.ActivityContext, input: str):
353352 return f"Hello, { input } !"
354353
355354 # Start a worker, which will connect to the sidecar in a background thread
356- with worker .TaskHubGrpcWorker () as w :
355+ with worker .TaskHubGrpcWorker (host_address = HOST ) as w :
357356 w .add_orchestrator (orchestrator )
358357 w .add_activity (say_hello )
359358 w .start ()
360359
361- task_hub_client = client .TaskHubGrpcClient ()
360+ task_hub_client = client .TaskHubGrpcClient (host_address = HOST )
362361 id = task_hub_client .schedule_new_orchestration (orchestrator )
363362 state = task_hub_client .wait_for_orchestration_completion (id , timeout = 30 )
364363 assert state is not None
@@ -375,7 +374,6 @@ def say_hello(ctx: task.ActivityContext, input: str):
375374 assert state .serialized_output == json .dumps ("Hello, World!" )
376375
377376
378- @pytest .mark .skip (reason = "durabletask-go does not yet support RestartInstance" )
379377def test_restart_with_new_instance_id ():
380378 def orchestrator (ctx : task .OrchestrationContext , _ ):
381379 result = yield ctx .call_activity (say_hello , input = "World" )
@@ -385,12 +383,12 @@ def say_hello(ctx: task.ActivityContext, input: str):
385383 return f"Hello, { input } !"
386384
387385 # Start a worker, which will connect to the sidecar in a background thread
388- with worker .TaskHubGrpcWorker () as w :
386+ with worker .TaskHubGrpcWorker (host_address = HOST ) as w :
389387 w .add_orchestrator (orchestrator )
390388 w .add_activity (say_hello )
391389 w .start ()
392390
393- task_hub_client = client .TaskHubGrpcClient ()
391+ task_hub_client = client .TaskHubGrpcClient (host_address = HOST )
394392 id = task_hub_client .schedule_new_orchestration (orchestrator )
395393 state = task_hub_client .wait_for_orchestration_completion (id , timeout = 30 )
396394 assert state is not None
0 commit comments