@@ -6445,14 +6445,12 @@ async def test_concurrent_sleeps_use_proper_options(
64456445class SignalsActivitiesTimersUpdatesTracingWorkflow :
64466446 def __init__ (self ) -> None :
64476447 self .events = []
6448- self .do_finish = False
64496448
64506449 @workflow .run
64516450 async def run (self ) -> list [str ]:
64526451 tt = asyncio .create_task (self .run_timer ())
64536452 at = asyncio .create_task (self .run_act ())
64546453 await asyncio .gather (tt , at )
6455- await workflow .wait_condition (lambda : self .do_finish )
64566454 return self .events
64576455
64586456 @workflow .signal
@@ -6475,10 +6473,6 @@ async def doupdate(self, name: str):
64756473 await workflow .wait_condition (lambda : True )
64766474 self .events .append (f"update-{ name } -2" )
64776475
6478- @workflow .signal
6479- async def do_finish (self ):
6480- self .do_finish = True
6481-
64826476 async def run_timer (self ):
64836477 self .events .append ("timer-sync" )
64846478 await workflow .sleep (0.1 )
@@ -6517,26 +6511,26 @@ async def test_async_loop_ordering(client: Client):
65176511 activities = [say_hello ],
65186512 task_queue = task_queue ,
65196513 ):
6514+ await asyncio .sleep (0.2 )
65206515 await handle .signal (SignalsActivitiesTimersUpdatesTracingWorkflow .dosig , "1" )
65216516 await handle .execute_update (
65226517 SignalsActivitiesTimersUpdatesTracingWorkflow .doupdate , "1"
65236518 )
6524- await handle .signal (SignalsActivitiesTimersUpdatesTracingWorkflow .do_finish )
6525- expected = [
6519+ expected_old = [
65266520 "sig-before-sync" ,
65276521 "sig-before-1" ,
6522+ "sig-before-2" ,
6523+ "timer-sync" ,
6524+ "act-sync" ,
6525+ "act-1" ,
6526+ "act-2" ,
65286527 "sig-1-sync" ,
65296528 "sig-1-1" ,
6529+ "sig-1-2" ,
65306530 "update-1-sync" ,
65316531 "update-1-1" ,
6532- 'timer-sync' ,
6533- 'act-sync' ,
6534- 'sig-before-2' ,
6535- 'sig-1-2' ,
6536- 'update-1-2' ,
6537- 'act-1' ,
6538- 'act-2' ,
6539- 'timer-1' ,
6540- 'timer-2' ,
6532+ "update-1-2" ,
6533+ "timer-1" ,
6534+ "timer-2"
65416535 ]
6542- assert await handle .result () == expected
6536+ assert await handle .result () == expected_old
0 commit comments