summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-08-28 21:47:50 +0000
committerAlan Conway <aconway@apache.org>2014-08-28 21:47:50 +0000
commit32e6b7d4d609f5c54a57bd663fffd445860f52cd (patch)
treeb18949167928f1d9b983190c4e3be61efafc1845 /qpid/cpp/src/tests
parent9ae659723b21d9d1c547cf85bf9aba0019b081d5 (diff)
downloadqpid-python-32e6b7d4d609f5c54a57bd663fffd445860f52cd.tar.gz
NO-JIRA: brokertest.py: don't use AMQP 1.0 if not available, ignore connection close teardown errors.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1621212 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rw-r--r--qpid/cpp/src/tests/brokertest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py
index 0c68bd4c5e..10040b6e97 100644
--- a/qpid/cpp/src/tests/brokertest.py
+++ b/qpid/cpp/src/tests/brokertest.py
@@ -40,8 +40,7 @@ from qpidtoollibs import BrokerAgent
#
# BrokerTest can be configured to determine which protocol is used by default:
#
-# -DPROTOCOL="amqpX": Use protocol "amqpX". Defaults to amqp1.0 if swig client
-# is being used, amqp0-10 if native client is being used.
+# -DPROTOCOL="amqpX": Use protocol "amqpX". Defaults to amqp1.0 if available.
#
# The configured defaults can be over-ridden on BrokerTest.connect and some
# other methods by specifying native=True|False and protocol="amqpX"
@@ -496,7 +495,7 @@ class BrokerTest(TestCase):
os.makedirs(self.dir)
os.chdir(self.dir)
self.teardown_list = [] # things to tear down at end of test
- if qpid_messaging: default_protocol="amqp1.0"
+ if qpid_messaging and self.amqp_lib: default_protocol="amqp1.0"
else: default_protocol="amqp0-10"
self.protocol = defs.get("PROTOCOL") or default_protocol
self.tx_protocol = "amqp0-10" # Transactions not yet supported over 1.0
@@ -513,7 +512,9 @@ class BrokerTest(TestCase):
a = getattr(p, m, None)
if a: a(); break
else: raise Exception("Don't know how to tear down %s", p)
- except Exception, e: err.append("%s: %s"%(e.__class__.__name__, str(e)))
+ except Exception, e:
+ if m != "close": # Ignore connection close errors.
+ err.append("%s: %s"%(e.__class__.__name__, str(e)))
self.teardown_list = [] # reset in case more processes start
os.chdir(self.rootdir)
if err: raise Exception("Unexpected process status:\n "+"\n ".join(err))