Commit c7ce0ced authored by Yoshinori Okuji's avatar Yoshinori Okuji

Dump more information when tic does not finish.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4268 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f28fb7d6
...@@ -257,7 +257,8 @@ class ERP5TypeTestCase(PortalTestCase): ...@@ -257,7 +257,8 @@ class ERP5TypeTestCase(PortalTestCase):
portal_activities.tic() portal_activities.tic()
# This prevents an infinite loop. # This prevents an infinite loop.
count -= 1 count -= 1
self.failUnless(count > 0) if count == 0:
raise RuntimeError, 'tic is looping forever. These messages are pending: %r' % (portal_activities.getMessageList(),)
# 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
...@@ -326,7 +327,7 @@ def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name, ...@@ -326,7 +327,7 @@ def setupERP5Site(business_template_list=(), app=None, portal_name=portal_name,
if hot_reindexing: if hot_reindexing:
setattr(app,'isIndexable',1) setattr(app,'isIndexable',1)
portal.portal_catalog.manage_hotReindexAll() portal.portal_catalog.manage_hotReindexAll()
portal_activities = getattr(portal,'portal_activities',None) portal_activities = getattr(portal,'portal_activities',None)
if portal_activities is not None: if portal_activities is not None:
while len(portal_activities.getMessageList()) > 0: while len(portal_activities.getMessageList()) > 0:
......
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