Commit 0cf95cb5 authored by Sebastien Robin's avatar Sebastien Robin

make sure when there is some Conflict Errors that we

do we do not delete the message without executing it.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17809 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2ca7ab8d
......@@ -681,8 +681,12 @@ class TestCMFActivity(ERP5TypeTestCase):
if self.__class__.current_num_conflict_errors < limit:
self.__class__.current_num_conflict_errors += 1
raise ConflictError
else:
foobar = getattr(self, 'foobar', 0)
setattr(self, 'foobar', foobar + 1)
Organisation.induceConflictErrors = induceConflictErrors
setattr(o, 'foobar', 0)
# Test some range of conflict error occurences.
for i in xrange(10):
Organisation.current_num_conflict_errors = 0
......@@ -690,6 +694,7 @@ class TestCMFActivity(ERP5TypeTestCase):
get_transaction().commit()
self.flushAllActivities(silent = 1, loop_size = i + 10)
self.assertEquals(len(activity_tool.getMessageList()), 0)
self.assertEqual(getattr(o, 'foobar', 0), 10)
def TryConflictErrorsWhileValidating(self, activity):
"""Try to execute active objects which may throw conflict errors
......
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