summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-05-29 18:03:50 +0000
committerAlan Conway <aconway@apache.org>2013-05-29 18:03:50 +0000
commitd9e90c6c43e1b81d68750ffa3cf09e3fdcf3cb13 (patch)
treeec3f8d1f590532428e0f4ce17ab31c0c84dcb681 /qpid/cpp/src
parent6b1d0c81ab29ca845923923cc502c05699a32a08 (diff)
downloadqpid-python-d9e90c6c43e1b81d68750ffa3cf09e3fdcf3cb13.tar.gz
NO-JIRA: Added connection timeout to python client, used in brokertests.
Added an optional timeout parameter to Connection.establish. Set a timeout of 5 seconds in brokertest.py to prevent hanging tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1487578 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/tests/brokertest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py
index 290a1dde2c..535d7220d7 100644
--- a/qpid/cpp/src/tests/brokertest.py
+++ b/qpid/cpp/src/tests/brokertest.py
@@ -305,9 +305,9 @@ class Broker(Popen):
def unexpected(self,msg):
raise BadProcessStatus("%s: %s (%s)" % (msg, self.name, self.pname))
- def connect(self, **kwargs):
+ def connect(self, timeout=5, **kwargs):
"""New API connection to the broker."""
- return messaging.Connection.establish(self.host_port(), **kwargs)
+ return messaging.Connection.establish(self.host_port(), timeout=timeout, **kwargs)
def connect_old(self):
"""Old API connection to the broker."""