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