1717endpoint = os .getenv ("ENDPOINT" , "http://localhost:8080" )
1818
1919
20- def test_client_signal_entity ():
20+ def test_client_signal_entity_and_custom_name ():
2121 invoked = False
2222
2323 def empty_entity (ctx : entities .EntityContext , _ ):
@@ -28,12 +28,12 @@ def empty_entity(ctx: entities.EntityContext, _):
2828 # Start a worker, which will connect to the sidecar in a background thread
2929 with DurableTaskSchedulerWorker (host_address = endpoint , secure_channel = True ,
3030 taskhub = taskhub_name , token_credential = None ) as w :
31- w .add_entity (empty_entity )
31+ w .add_entity (empty_entity , name = "EntityNameCustom" )
3232 w .start ()
3333
3434 c = DurableTaskSchedulerClient (host_address = endpoint , secure_channel = True ,
3535 taskhub = taskhub_name , token_credential = None )
36- entity_id = entities .EntityInstanceId ("empty_entity " , "testEntity" )
36+ entity_id = entities .EntityInstanceId ("EntityNameCustom " , "testEntity" )
3737 c .signal_entity (entity_id , "do_nothing" )
3838 time .sleep (2 ) # wait for the signal to be processed
3939
@@ -70,7 +70,7 @@ def empty_entity(ctx: entities.EntityContext, _):
7070 assert invoked
7171
7272
73- def test_orchestration_signal_entity ():
73+ def test_orchestration_signal_entity_and_custom_name ():
7474 invoked = False
7575
7676 def empty_entity (ctx : entities .EntityContext , _ ):
@@ -79,14 +79,14 @@ def empty_entity(ctx: entities.EntityContext, _):
7979 invoked = True
8080
8181 def empty_orchestrator (ctx : task .OrchestrationContext , _ ):
82- entity_id = entities .EntityInstanceId ("empty_entity " , f"{ ctx .instance_id } _testEntity" )
82+ entity_id = entities .EntityInstanceId ("EntityNameCustom " , f"{ ctx .instance_id } _testEntity" )
8383 ctx .signal_entity (entity_id , "do_nothing" )
8484
8585 # Start a worker, which will connect to the sidecar in a background thread
8686 with DurableTaskSchedulerWorker (host_address = endpoint , secure_channel = True ,
8787 taskhub = taskhub_name , token_credential = None ) as w :
8888 w .add_orchestrator (empty_orchestrator )
89- w .add_entity (empty_entity )
89+ w .add_entity (empty_entity , name = "EntityNameCustom" )
9090 w .start ()
9191
9292 c = DurableTaskSchedulerClient (host_address = endpoint , secure_channel = True ,
0 commit comments