Skip to content

Commit

Permalink
tests/f: api-suite-info/00 - de-flaky test
Browse files Browse the repository at this point in the history
* fix sort order of config items in output
  • Loading branch information
oliver-sanders committed Aug 16, 2021
1 parent fcfe400 commit 954b5ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def __init__(
else:
if foot not in self.feet:
self.feet.append(foot)
self.feet.sort() # sort effects get_graph_raw output

# Replace workflow and task name in workflow and task URLs.
self.cfg['meta']['URL'] = self.cfg['meta']['URL'] % {
Expand Down Expand Up @@ -1434,8 +1435,12 @@ def _check_explicit_cycling(self):
taskdef.check_for_explicit_cycling()

def get_task_name_list(self):
# return a list of all tasks used in the dependency graph
return list(self.taskdefs)
"""Return a sorted list of all tasks used in the dependency graph.
Note: the sort order may effect get_graph_raw ouput.
"""
return sorted(self.taskdefs)

def generate_edges(self, lexpr, orig_lexpr, left_nodes, right, seq,
suicide=False):
Expand Down
3 changes: 2 additions & 1 deletion cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ def info_get_graph_raw(self, cto, ctn, grouping=None):
self.config.get_graph_raw(cto, ctn, grouping),
self.config.workflow_polling_tasks,
self.config.leaves,
self.config.feet)
self.config.feet
)

def command_stop(
self,
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/api-workflow-info/00-get-graph-raw-1.t
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ cmp_ok "${WORKFLOW_RUN_DIR}/ctb-get-graph-raw.out" <<'__OUT__'
"t3"
],
[
"t1",
"T"
"T",
"t1"
]
]
__OUT__
Expand Down

0 comments on commit 954b5ce

Please sign in to comment.