Commit 86698987 authored by Łukasz Nowak's avatar Łukasz Nowak

Send process_timeout

Extend subscribeNode to send configuration provided by user.
parent a4e0fae3
...@@ -262,12 +262,15 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -262,12 +262,15 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_node_module = self._getTestNodeModule() test_node_module = self._getTestNodeModule()
portal = self.getPortalObject() portal = self.getPortalObject()
config = {}
tag = "%s_%s" % (self.getRelativeUrl(), title) tag = "%s_%s" % (self.getRelativeUrl(), title)
if portal.portal_activities.countMessageWithTag(tag) == 0: if portal.portal_activities.countMessageWithTag(tag) == 0:
test_node_list = test_node_module.searchFolder( test_node_list = test_node_module.searchFolder(
portal_type="Test Node", portal_type="Test Node",
title=SimpleQuery(comparison_operator='=', title=title), title=SimpleQuery(comparison_operator='=', title=title),
) )
if getattr(self, 'getProcessTimeout', None) is not None:
config['process_timeout'] = self.getProcessTimeout()
assert len(test_node_list) in (0, 1), "Unable to find testnode : %s" % title assert len(test_node_list) in (0, 1), "Unable to find testnode : %s" % title
test_node = None test_node = None
if len(test_node_list) == 1: if len(test_node_list) == 1:
...@@ -283,8 +286,9 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -283,8 +286,9 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
activate_kw={'tag': tag}) activate_kw={'tag': tag})
self.activate(after_tag=tag).optimizeConfiguration() self.activate(after_tag=tag).optimizeConfiguration()
test_node.setPingDate() test_node.setPingDate()
return test_node if batch_mode:
return None return config
return json.dumps(config)
def _getSortedNodeTestSuiteToRun(self, test_node): def _getSortedNodeTestSuiteToRun(self, test_node):
""" """
......
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