[Erp5-report] r44365 seb - /erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 16 17:13:22 CET 2011
Author: seb
Date: Wed Mar 16 17:13:22 2011
New Revision: 44365
URL: http://svn.erp5.org?rev=44365&view=rev
Log:
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
Modified:
erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py
Modified: erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py?rev=44365&r1=44364&r2=44365&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/ProcessingNodeTestCase.py [utf8] Wed Mar 16 17:13:22 2011
@@ -169,7 +169,8 @@ class ProcessingNodeTestCase(backportUni
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()
More information about the Erp5-report
mailing list