@@ -696,7 +696,7 @@ async def test_trigger_with_sequential_task(flow, scheduler, run, log_filter):
696696 await asyncio .sleep (0 )
697697
698698
699- async def test_trigger_whilst_paused_preparing (flow , scheduler , run , complete ):
699+ async def test_trigger_whilst_paused_preparing (one , run , complete ):
700700 """It should run "preparing" tasks even if the workflow is paused.
701701
702702 Remote init leaves tasks as preparing for a while. These must still be
@@ -705,22 +705,15 @@ async def test_trigger_whilst_paused_preparing(flow, scheduler, run, complete):
705705 See https://github.com/cylc/cylc-flow/pull/6768
706706
707707 """
708- id_ = flow (
709- {
710- 'scheduling' : {
711- 'graph' : {'R1' : 'a' },
712- },
713- }
714- )
715- schd = scheduler (id_ )
716- async with run (schd ):
717-
718- # Instead of triggering, artificially set it as preparing.
719- a = schd .pool .get_tasks ()[0 ]
720- a .state_reset (TASK_STATUS_PREPARING )
708+ async with run (one ):
709+ await run_cmd (
710+ force_trigger_tasks (
711+ one , [one .pool .get_tasks ()[0 ].tokens .relative_id ], ['1' ]
712+ )
713+ )
721714
722715 # 1/a should run even though the workflow is paused.
723- await complete (schd , '1/a ' , allow_paused = True , timeout = 1 )
716+ await complete (one , '1/one ' , allow_paused = True , timeout = 1 )
724717
725718
726719async def test_trigger_with_task_selector (flow , scheduler , start , monkeypatch ):
0 commit comments