Commit aa243abb authored by Benjamin Blanc's avatar Benjamin Blanc

util: fix bug on test_result_proxy

parent ff05f123
...@@ -42,11 +42,9 @@ class ScalabilityLauncher(object): ...@@ -42,11 +42,9 @@ class ScalabilityLauncher(object):
file_handler.setFormatter(formatter) file_handler.setFormatter(formatter)
logger.addHandler(file_handler) logger.addHandler(file_handler)
self.log = logger.info self.log = logger.info
# Proxy to with erp5 master test_result # Proxy to with erp5 master test_result
result = taskdistribution.TestResultProxyProxy(self.__argumentNamespace.portal_url, self.test_result = taskdistribution.TestResultProxyProxy(self.__argumentNamespace.portal_url,
1.0, logger, self.__argumentNamespace.test_result_url, 1.0, logger, self.__argumentNamespace.test_result_url,
self.__argumentNamespace.node_title, self.__argumentNamespace.revision) self.__argumentNamespace.node_title, self.__argumentNamespace.revision)
...@@ -100,6 +98,8 @@ class ScalabilityLauncher(object): ...@@ -100,6 +98,8 @@ class ScalabilityLauncher(object):
""" """
Update state of a test_result_line Update state of a test_result_line
""" """
# TODO : set a line per count value and use setState (?)
#
pass pass
def _getNextTest(self): def _getNextTest(self):
...@@ -112,20 +112,19 @@ class ScalabilityLauncher(object): ...@@ -112,20 +112,19 @@ class ScalabilityLauncher(object):
return next_test return next_test
def run(self): def run(self):
self.log("Scalability Launcher started")
max_time = 10 max_time = 10
start_time = time.time() start_time = time.time()
error_message_set, exit_status = set(), 0 error_message_set, exit_status = set(), 0
self.log("%s", self.test_result.isAlive())
print self.__argumentNamespace.test_result_url
print self.__argumentNamespace.erp5_url
print self.__argumentNamespace.revision
print self.__argumentNamespace.node_title
while time.time()-start_time < max_time: while time.time()-start_time < max_time:
current_test = self._getNextTest() current_test = self._getNextTest()
current_test.dump() current_test.dump()
time.sleep(2) time.sleep(2)
return error_message_set, exit_status return error_message_set, exit_status
def main(): def main():
......
...@@ -360,10 +360,10 @@ class TestResultProxyProxy(TestResultProxy): ...@@ -360,10 +360,10 @@ class TestResultProxyProxy(TestResultProxy):
proxy = ServerProxy( proxy = ServerProxy(
portal_url, portal_url,
allow_none=True, allow_none=True,
).portal_task_distribution ).test_result_module
except: except:
raise ValueError("Cannot instanciate ServerProxy") raise ValueError("Cannot instanciate ServerProxy")
TestResultProxy(proxy, retry_time, logger, test_result_path, TestResultProxy.__init__(self, proxy, retry_time, logger, test_result_path,
node_title, revision) node_title, revision)
......
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