Commit cf5d3797 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Tristan Cavelier

CHERRY-PICKED 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 f1549a1d
...@@ -225,7 +225,7 @@ class TaskDistributionTool(BaseTool): ...@@ -225,7 +225,7 @@ class TaskDistributionTool(BaseTool):
line = portal.restrictedTraverse(test_path) line = portal.restrictedTraverse(test_path)
test_result = line.getParentValue() test_result = line.getParentValue()
if test_result.getSimulationState() == 'started': if test_result.getSimulationState() == 'started':
if line.getSimulationState() == "started": if line.getSimulationState() in ["draft", "started"]:
line.stop(**status_dict) line.stop(**status_dict)
if {"stopped"} == {x.getSimulationState() if {"stopped"} == {x.getSimulationState()
for x in test_result.objectValues(portal_type="Test Result Line")}: 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