Commit c6fe8d9b authored by Sebastien Robin's avatar Sebastien Robin

make erp5.util.testnode able to resist to problems with slapos proxy

parent 541e19f6
......@@ -96,6 +96,7 @@ class SlapOSControler(object):
# XXX: dirty, giving some time for proxy to being able to accept
# connections
time.sleep(10)
try:
slap = slapos.slap.slap()
self.slap = slap
self.slap.initializeConnection(config['master_url'])
......@@ -105,6 +106,10 @@ class SlapOSControler(object):
path,
computer_guid=config['computer_id'])
computer = slap.registerComputer(config['computer_id'])
except:
self.log("SlapOSControler.initializeSlapOSControler, \
exception in registerSupply", exc_info=sys.exc_info())
raise ValueError("Unable to initializeSlapOSControler")
# Reset all previously generated software if needed
if reset_software:
self._resetSoftware()
......
......@@ -436,6 +436,7 @@ branch = %(branch)s
try:
while True:
try:
node_test_suite = None
self.log = self.process_manager.log = self.testnode_log
self.cleanUp(None)
remote_test_result_needs_cleanup = False
......@@ -497,6 +498,7 @@ branch = %(branch)s
except ValueError as e:
# This could at least happens if runTestSuite is not found
log("ValueError", exc_info=sys.exc_info())
if node_test_suite is not None:
node_test_suite.retry_software_count += 1
except CancellationError, e:
log("CancellationError", exc_info=sys.exc_info())
......
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