Commit d7346302 authored by Sebastien Robin's avatar Sebastien Robin

- the behavior has changed, it is better to keep messages wich fails

  into SQLDict, even if another message with the same method on the 
  same objects works after.
  


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17793 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 148d693f
...@@ -436,14 +436,15 @@ class TestAlarm(ERP5TypeTestCase): ...@@ -436,14 +436,15 @@ class TestAlarm(ERP5TypeTestCase):
self.getPortal().portal_skins[skin_folder_id][sense_method_id].ZPythonScript_edit('*args,**kw', 'context.newActiveProcess()') self.getPortal().portal_skins[skin_folder_id][sense_method_id].ZPythonScript_edit('*args,**kw', 'context.newActiveProcess()')
alarm.activeSense() alarm.activeSense()
get_transaction().commit() get_transaction().commit()
# Note: this call to tic will not fail, because the same method on the same # Note: this call to tic will fail, because the previous message is still there
# object is activated again in SQLDict. When the new message will be # This behaviour is logical if we consider that we want to keep errors
# -successfully- processed, the previous -failed- message will get removed # in order to know that an error occured.
# in the cleanup. This behaviour is logical if we consider that manually try:
# executing the failed message to get the error will lead to no error. self.tic()
# But it can also be considered illogical if failed messages are supposed except RuntimeError:
# to be preserved for future analysis. pass
self.tic() else:
raise Exception, 'Tic did not raise though activity was supposed to fail'
# Chen that the second alarm execution did happen # Chen that the second alarm execution did happen
self.assertNotEquals(alarm.getLastActiveProcess(), None) self.assertNotEquals(alarm.getLastActiveProcess(), None)
......
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