Skip to content
Snippets Groups Projects

Draft: Add test of execution of workflow with self-triggering task

Open Loic Huder requested to merge self-trigger-test into main
@@ -9,19 +9,17 @@ from ewokscore.tests.utils.results import assert_execute_graph_default_result
@pytest.mark.parametrize("graph_name", graph_names())
@pytest.mark.parametrize("scheme", (None, "json"))
def test_execute_graph(graph_name, scheme, ppf_log_config, tmpdir):
if graph_name == "self_trigger":
pytest.skip(
"Self-triggering workflow execution is inconsistent: https://gitlab.esrf.fr/workflow/ewoks/ewoksppf/-/issues/16"
)
graph, expected = get_graph(graph_name)
if scheme:
varinfo = {"root_uri": str(tmpdir), "scheme": scheme}
else:
varinfo = None
# Temporary fix until https://gitlab.esrf.fr/workflow/ewoks/ewokscore/-/merge_requests/237 is release
if graph_name == "self_trigger":
graph["nodes"][1]["default_inputs"] = [{"name": "a", "value": 1}]
expected = {
"task3": {"too_small": False, "result": 11},
}
ewoksgraph = load_graph(graph)
result = execute_graph(graph, varinfo=varinfo, timeout=10)
assert_execute_graph_default_result(ewoksgraph, result, expected, varinfo)
Loading