Commit 27c9ee9b authored by Julien Muchembled's avatar Julien Muchembled

Unit tests: execute activities at most 2 times before failing

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42230 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 10dab3a6
...@@ -101,6 +101,10 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor): ...@@ -101,6 +101,10 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
def afterSetUp(self): def afterSetUp(self):
super(TestCMFActivity, self).afterSetUp() super(TestCMFActivity, self).afterSetUp()
from Products.CMFActivity.ActivityRuntimeEnvironment import BaseMessage
# Set 'max_retry' to a known value so that we can test the feature
BaseMessage.max_retry = property(lambda self:
self.activity_kw.get('max_retry', 5))
self.login() self.login()
portal = self.portal portal = self.portal
# trap outgoing e-mails # trap outgoing e-mails
......
...@@ -485,6 +485,12 @@ class ERP5TypeTestCase(ProcessingNodeTestCase, PortalTestCase): ...@@ -485,6 +485,12 @@ class ERP5TypeTestCase(ProcessingNodeTestCase, PortalTestCase):
'''Sets up the fixture. Do not override, '''Sets up the fixture. Do not override,
use the hooks instead. use the hooks instead.
''' '''
from Products.CMFActivity.ActivityRuntimeEnvironment import BaseMessage
# Activities in unit tests shall never fail.
# Let's be a litte tolerant for the moment.
BaseMessage.max_retry = property(lambda self:
self.activity_kw.get('max_retry', 1))
use_dummy_mail_host = os.environ.get('use_dummy_mail_host', 0) use_dummy_mail_host = os.environ.get('use_dummy_mail_host', 0)
template_list = self.getBusinessTemplateList() template_list = self.getBusinessTemplateList()
erp5_catalog_storage = os.environ.get('erp5_catalog_storage', erp5_catalog_storage = os.environ.get('erp5_catalog_storage',
......
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