|
42 | 42 | ) |
43 | 43 |
|
44 | 44 |
|
45 | | -async def test_trigger_workflow_paused( |
| 45 | +async def test_workflow_paused_simple( |
| 46 | + one_conf, flow, scheduler, run, complete |
| 47 | +): |
| 48 | + """It should run triggered tasks even if the workflow is paused.""" |
| 49 | + schd: Scheduler = scheduler(flow(one_conf), paused_start=True) |
| 50 | + async with run(schd): |
| 51 | + await run_cmd(force_trigger_tasks(schd, ['1/one'], ['1'])) |
| 52 | + await complete(schd, '1/one', allow_paused=True, timeout=1) |
| 53 | + |
| 54 | + |
| 55 | +async def test_workflow_paused_queues( |
46 | 56 | flow: 'Fixture', |
47 | 57 | scheduler: 'Fixture', |
48 | 58 | start: 'Fixture', |
@@ -111,22 +121,17 @@ async def test_trigger_workflow_paused( |
111 | 121 |
|
112 | 122 |
|
113 | 123 | async def test_trigger_group_whilst_paused(flow, scheduler, run, complete): |
114 | | - """Only group start tasks should run whilst the scheduler is paused. |
| 124 | + """Only group start tasks should run if the group is triggered whilst |
| 125 | + the scheduler is paused. |
115 | 126 |
|
116 | 127 | Group start tasks have only off-group dependencies. |
117 | 128 |
|
118 | 129 | Others (with in-group dependencies) should run as normal when their |
119 | 130 | prerequisites are satisfied once the workflow is resumed. |
120 | 131 |
|
121 | 132 | """ |
122 | | - id_ = flow( |
123 | | - { |
124 | | - 'scheduling': { |
125 | | - 'graph': {'R1': 'a => b => c => d'}, |
126 | | - }, |
127 | | - } |
128 | | - ) |
129 | | - schd = scheduler(id_) |
| 133 | + id_ = flow('a => b => c => d') |
| 134 | + schd = scheduler(id_, paused_start=True) |
130 | 135 | async with run(schd): |
131 | 136 | # trigger the chain |
132 | 137 | await run_cmd(force_trigger_tasks(schd, ['1/a'], [])) |
|
0 commit comments