@@ -113,7 +113,9 @@ class UiPathTestRuntimeFactory:
113113 def __init__ (self , runtime_class : type [UiPathRuntimeProtocol ]):
114114 self .runtime_class = runtime_class
115115
116- async def new_runtime (self , entrypoint : str ) -> UiPathRuntimeProtocol :
116+ async def new_runtime (
117+ self , entrypoint : str , runtime_id : str
118+ ) -> UiPathRuntimeProtocol :
117119 return self .runtime_class ()
118120
119121
@@ -128,21 +130,21 @@ async def test_multiple_factories_same_executor():
128130 factory_c = UiPathTestRuntimeFactory (MockRuntimeC )
129131
130132 # Execute runtime A
131- runtime_a = await factory_a .new_runtime (entrypoint = "" )
133+ runtime_a = await factory_a .new_runtime (entrypoint = "" , runtime_id = "runtime-a" )
132134 execution_runtime_a = UiPathExecutionRuntime (
133135 runtime_a , trace_manager , "runtime-a-span" , execution_id = "exec-a"
134136 )
135137 result_a = await execution_runtime_a .execute ({"input" : "a" })
136138
137139 # Execute runtime B
138- runtime_b = await factory_b .new_runtime (entrypoint = "" )
140+ runtime_b = await factory_b .new_runtime (entrypoint = "" , runtime_id = "runtime-b" )
139141 execution_runtime_b = UiPathExecutionRuntime (
140142 runtime_b , trace_manager , "runtime-b-span" , execution_id = "exec-b"
141143 )
142144 result_b = await execution_runtime_b .execute ({"input" : "b" })
143145
144146 # Execute runtime C with custom spans
145- runtime_c = await factory_c .new_runtime (entrypoint = "" )
147+ runtime_c = await factory_c .new_runtime (entrypoint = "" , runtime_id = "runtime-c" )
146148 execution_runtime_c = UiPathExecutionRuntime (
147149 runtime_c , trace_manager , "runtime-c-span" , execution_id = "exec-c"
148150 )
0 commit comments