Commit 39678eb9 authored by Łukasz Nowak's avatar Łukasz Nowak

Allow to stop draft test results

This is accompanying commit to "erp5_test_result: stop affecting last
remaining tests to all test nodes", where alarms redrafts running tests
for long running nodes.

In case of very long running test nodes, to which support is introduced
in this work, it is acceptable situation that test will get redrafted
and shall be stopped.
parent fb2a7319
......@@ -225,7 +225,7 @@ class TaskDistributionTool(BaseTool):
line = portal.restrictedTraverse(test_path)
test_result = line.getParentValue()
if test_result.getSimulationState() == 'started':
if line.getSimulationState() == "started":
if line.getSimulationState() in ["draft", "started"]:
line.stop(**status_dict)
if {"stopped"} == {x.getSimulationState()
for x in test_result.objectValues(portal_type="Test Result Line")}:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment