Commit 63404804 authored by Sebastien Robin's avatar Sebastien Robin

do not execute more than 900 times uselessly this loop when

it is not needed, this makes unit test reporting infinite
activity loop much more faster

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44365 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent babfc91f
......@@ -169,7 +169,8 @@ class ProcessingNodeTestCase(backportUnittest.TestCase, ZopeTestCase.TestCase):
message_count = len(message_list)
# This prevents an infinite loop.
count -= 1
if count == 0:
if count == 0 or (message_count and set([x.processing_node for x in
message_list]).issubset(set([-2, -3]))):
error_message = 'tic is looping forever. '
try:
self.assertNoPendingMessage()
......
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