diff --git a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py index 07869b95fa66662943a876c26fc29f5d9a2ec20a..4420a1a2d46bd700c688af9069e17b9528462c66 100755 --- a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py @@ -252,7 +252,7 @@ class FunctionalTestRunner: remote_code_url_list = None - # There is no test that can take more them 24 hours + # There is no test that can take more them 2 hours timeout = 2.0 * 60 * 60 def __init__(self, host, port, portal, run_only='', use_phanthom=False): @@ -294,12 +294,20 @@ class FunctionalTestRunner: while self.getStatus() is None: time.sleep(10) if (time.time() - start) > float(self.timeout): + self.verboseErrorLog() raise TimeoutError("Test took more them %s seconds" % self.timeout) finally: self.browser.quit() xvfb.quit() + def verboseErrorLog(self, size=10): + for entry in self.portal.error_log.getLogEntries()[:size]: + print "="*20 + print "ERROR ID : %s" % entry["id"] + print "TRACEBACK :" + print entry["tb_text"] + def processResult(self): file_content = self.getStatus().encode("utf-8", "replace") sucess_amount = TEST_PASS_RE.search(file_content).group(1)