You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2010/03/04 16:35:04 UTC

svn commit: r919024 - /qpid/trunk/qpid/python/qpid/brokertest.py

Author: aconway
Date: Thu Mar  4 15:35:04 2010
New Revision: 919024

URL: http://svn.apache.org/viewvc?rev=919024&view=rev
Log:
Increase timeout for python cluster tests, was timing out prematurely in some tests.

Modified:
    qpid/trunk/qpid/python/qpid/brokertest.py

Modified: qpid/trunk/qpid/python/qpid/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/brokertest.py?rev=919024&r1=919023&r2=919024&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/brokertest.py (original)
+++ qpid/trunk/qpid/python/qpid/brokertest.py Thu Mar  4 15:35:04 2010
@@ -89,7 +89,7 @@
     except: return ""
     return result
 
-def retry(function, timeout=1, delay=.001):
+def retry(function, timeout=5, delay=.01):
     """Call function until it returns True or timeout expires.
     Double the delay for each retry. Return True if function
     returns true, False if timeout expires."""
@@ -188,7 +188,7 @@
             except:
                 self.unexpected("expected running, exit code %d" % self.wait())
         else:
-            retry(self.poll)
+            retry(lambda: self.poll() is not None)
             if self.returncode is None: # Still haven't stopped
                 self.kill()
                 self.unexpected("still running")
@@ -357,7 +357,7 @@
     def ready(self):
         """Wait till broker is ready to serve clients"""
         # First make sure the broker is listening by checking the log.
-        if not retry(lambda: self.log_ready()):
+        if not retry(self.log_ready):
             raise Exception("Timed out waiting for broker %s" % self.name)
         # Make a connection, this will wait for extended cluster init to finish.
         try: self.connect().close()



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org