summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-03-04 15:35:04 +0000
committerAlan Conway <aconway@apache.org>2010-03-04 15:35:04 +0000
commita9d455913c20b8419f4e41ae78aa40e99fdccbf9 (patch)
tree680bcc802c8224d933d5c1ad46167398e0865173
parent8b7ccda42f91b953e63acdd8123920418863f7b3 (diff)
downloadqpid-python-a9d455913c20b8419f4e41ae78aa40e99fdccbf9.tar.gz
Increase timeout for python cluster tests, was timing out prematurely in some tests.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@919024 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/python/qpid/brokertest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py
index d0ec6e0932..4feb7413d1 100644
--- a/qpid/python/qpid/brokertest.py
+++ b/qpid/python/qpid/brokertest.py
@@ -89,7 +89,7 @@ def error_line(filename):
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 @@ class Popen(popen2.Popen3):
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 @@ class Broker(Popen):
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()