Commit c84052cb authored by Yusei Tahara's avatar Yusei Tahara

Output error_log message when tic fails.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18907 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d9553723
...@@ -498,10 +498,21 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -498,10 +498,21 @@ class ERP5TypeTestCase(PortalTestCase):
# This prevents an infinite loop. # This prevents an infinite loop.
count -= 1 count -= 1
if count == 0: if count == 0:
# Get the last error message from error_log.
error_message = ''
error_log = self.getPortal().error_log._getLog()
if len(error_log):
error_message = '\nLast error message:\n%s\n%s\n%s\n' % (
error_log[0]['type'],
error_log[0]['value'],
error_log[0]['tb_text'],
)
raise RuntimeError,\ raise RuntimeError,\
'tic is looping forever. These messages are pending: %r' % ( 'tic is looping forever. These messages are pending: %r %s' % (
[('/'.join(m.object_path), m.method_id, m.processing_node, m.priority) [('/'.join(m.object_path), m.method_id, m.processing_node, m.priority)
for m in portal_activities.getMessageList()],) for m in portal_activities.getMessageList()],
error_message
)
# This give some time between messages # This give some time between messages
if count % 10 == 0: if count % 10 == 0:
from Products.CMFActivity.Activity.Queue import VALIDATION_ERROR_DELAY from Products.CMFActivity.Activity.Queue import VALIDATION_ERROR_DELAY
......
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