Commit c2e728a1 authored by Vincent Pelletier's avatar Vincent Pelletier

Products.ERP5Type.test.ProcessingNodeTestCase: Allow overriding default tic delay.

parent 17e1460a
...@@ -269,7 +269,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase): ...@@ -269,7 +269,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase):
transaction.commit() transaction.commit()
self.abort() self.abort()
def tic(self, verbose=0, stop_condition=lambda message_list: False): def tic(self, verbose=0, stop_condition=lambda message_list: False, delay=600):
"""Execute pending activities""" """Execute pending activities"""
transaction.commit() transaction.commit()
# Some tests like testDeferredStyle require that we use self.getPortal() # Some tests like testDeferredStyle require that we use self.getPortal()
...@@ -280,7 +280,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase): ...@@ -280,7 +280,7 @@ class ProcessingNodeTestCase(ZopeTestCase.TestCase):
ZopeTestCase._print('Executing pending activities ...') ZopeTestCase._print('Executing pending activities ...')
old_message_count = 0 old_message_count = 0
start = time.time() start = time.time()
deadline = start + 600 # This prevents an infinite loop. deadline = start + delay # This prevents an infinite loop.
getMessageList = portal_activities.getMessageList getMessageList = portal_activities.getMessageList
message_list = getMessageList() message_list = getMessageList()
message_count = len(message_list) message_count = len(message_list)
......
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