@@ -6445,14 +6445,12 @@ async def test_concurrent_sleeps_use_proper_options(
6445
6445
class SignalsActivitiesTimersUpdatesTracingWorkflow :
6446
6446
def __init__ (self ) -> None :
6447
6447
self .events = []
6448
- self .do_finish = False
6449
6448
6450
6449
@workflow .run
6451
6450
async def run (self ) -> list [str ]:
6452
6451
tt = asyncio .create_task (self .run_timer ())
6453
6452
at = asyncio .create_task (self .run_act ())
6454
6453
await asyncio .gather (tt , at )
6455
- await workflow .wait_condition (lambda : self .do_finish )
6456
6454
return self .events
6457
6455
6458
6456
@workflow .signal
@@ -6475,10 +6473,6 @@ async def doupdate(self, name: str):
6475
6473
await workflow .wait_condition (lambda : True )
6476
6474
self .events .append (f"update-{ name } -2" )
6477
6475
6478
- @workflow .signal
6479
- async def do_finish (self ):
6480
- self .do_finish = True
6481
-
6482
6476
async def run_timer (self ):
6483
6477
self .events .append ("timer-sync" )
6484
6478
await workflow .sleep (0.1 )
@@ -6517,26 +6511,26 @@ async def test_async_loop_ordering(client: Client):
6517
6511
activities = [say_hello ],
6518
6512
task_queue = task_queue ,
6519
6513
):
6514
+ await asyncio .sleep (0.2 )
6520
6515
await handle .signal (SignalsActivitiesTimersUpdatesTracingWorkflow .dosig , "1" )
6521
6516
await handle .execute_update (
6522
6517
SignalsActivitiesTimersUpdatesTracingWorkflow .doupdate , "1"
6523
6518
)
6524
- await handle .signal (SignalsActivitiesTimersUpdatesTracingWorkflow .do_finish )
6525
- expected = [
6519
+ expected_old = [
6526
6520
"sig-before-sync" ,
6527
6521
"sig-before-1" ,
6522
+ "sig-before-2" ,
6523
+ "timer-sync" ,
6524
+ "act-sync" ,
6525
+ "act-1" ,
6526
+ "act-2" ,
6528
6527
"sig-1-sync" ,
6529
6528
"sig-1-1" ,
6529
+ "sig-1-2" ,
6530
6530
"update-1-sync" ,
6531
6531
"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"
6541
6535
]
6542
- assert await handle .result () == expected
6536
+ assert await handle .result () == expected_old
0 commit comments