Skip to content

Commit 740e4c0

Browse files
dwsutherlandhjoliverwxtimMetRonnie
committed
Apply suggestions from code review
Co-authored-by: Hilary James Oliver <[email protected]> Co-authored-by: Tim Pillinger <[email protected]> Co-authored-by: Ronnie Dutta <[email protected]>
1 parent 34791d8 commit 740e4c0

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

tests/integration/test_reload.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,14 @@ async def test_orphan_reload(
317317
"""Reload should not fail about orphaned tasks.
318318
319319
The following aspects of reload about orphans are tested:
320-
- Removal of both xtrigger and associated active/incomplete task.
321320
- Broadcast deltas generated after reload.
321+
https://github.com/cylc/cylc-flow/issues/6814
322+
- Removal of both xtrigger and associated active/incomplete task.
323+
https://github.com/cylc/cylc-flow/issues/6815
324+
325+
(Orphans being active/incomplete tasks removed from reloaded workflow cfg.)
322326
"""
323327
before = {
324-
'scheduler': {
325-
'allow implicit tasks': True
326-
},
327328
'scheduling': {
328329
'initial cycle point': '20010101T0000Z',
329330
'graph': {
@@ -335,9 +336,6 @@ async def test_orphan_reload(
335336
}
336337
}
337338
after = {
338-
'scheduler': {
339-
'allow implicit tasks': True
340-
},
341339
'scheduling': {
342340
'initial cycle point': '20010101T0000Z',
343341
'graph': {
@@ -349,14 +347,11 @@ async def test_orphan_reload(
349347
schd = scheduler(id_)
350348
async with start(schd):
351349
# spawn in bar
352-
foo = schd.pool.get_tasks()[0]
353-
schd.pool.task_events_mgr.process_message(
354-
foo, '20010101T0000Z', 'succeeded')
355-
bar = schd.pool.get_tasks()[0]
356-
assert bar.identity == '20010101T0000Z/bar'
350+
foo = schd.pool._get_task_by_id('20010101T0000Z/foo')
351+
schd.pool.task_events_mgr.process_message(foo, 'INFO', 'succeeded')
352+
bar = schd.pool._get_task_by_id('20010101T0000Z/bar')
357353
# set bar to failed
358-
schd.pool.task_events_mgr.process_message(
359-
bar, '20010101T0000Z', 'failed')
354+
schd.pool.task_events_mgr.process_message(bar, 'INFO', 'failed')
360355

361356
# Save our progress
362357
schd.workflow_db_mgr.put_task_pool(schd.pool)

0 commit comments

Comments
 (0)