diff options
| author | Keith Wall <kwall@apache.org> | 2015-03-12 14:16:16 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2015-03-12 14:16:16 +0000 |
| commit | c58b28b9b38a72e47f5b24a2b4e565c842e0858c (patch) | |
| tree | fa0258e1685248c7bceadaa984d488cb37356c37 /qpid/cpp/src/tests | |
| parent | e8e05131324cf3137a3c65a95cad833cd3275c78 (diff) | |
| parent | 08acb6bdc6ded10012ff4c2d2e303121b4985882 (diff) | |
| download | qpid-python-c58b28b9b38a72e47f5b24a2b4e565c842e0858c.tar.gz | |
Merge from trunk
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/QPID-6262-JavaBrokerNIO@1666204 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/Variant.cpp | 10 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/brokertest.py | 19 |
2 files changed, 23 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/Variant.cpp b/qpid/cpp/src/tests/Variant.cpp index d6605f9fe5..5ae7fc89eb 100644 --- a/qpid/cpp/src/tests/Variant.cpp +++ b/qpid/cpp/src/tests/Variant.cpp @@ -815,12 +815,16 @@ QPID_AUTO_TEST_CASE(described) BOOST_CHECK(!a.isDescribed()); a.getDescriptors().push_back("foo"); BOOST_CHECK(a.isDescribed()); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 1U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); a = 42; BOOST_CHECK(a.isDescribed()); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 1U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); a.getDescriptors().push_back(33); - BOOST_CHECK_EQUAL(a.getDescriptors(), list_of<Variant>("foo")(33)); + BOOST_CHECK_EQUAL(a.getDescriptors().size(), 2U); + BOOST_CHECK_EQUAL(a.getDescriptors().front(), Variant("foo")); + BOOST_CHECK_EQUAL(*(++a.getDescriptors().begin()), Variant(33)); a.getDescriptors().clear(); BOOST_CHECK(!a.isDescribed()); } diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py index 2566bc527d..6fae88092b 100644 --- a/qpid/cpp/src/tests/brokertest.py +++ b/qpid/cpp/src/tests/brokertest.py @@ -21,7 +21,6 @@ import os, signal, string, tempfile, subprocess, socket, threading, time, imp, re import qpid, traceback, signal -import proton from qpid import connection, util from qpid.compat import format_exc from unittest import TestCase @@ -493,7 +492,16 @@ class BrokerTest(TestCase): test_store_lib = os.getenv("TEST_STORE_LIB") rootdir = os.getcwd() - PN_VERSION = (proton.VERSION_MAJOR, proton.VERSION_MINOR) + try: + import proton + PN_VERSION = (proton.VERSION_MAJOR, proton.VERSION_MINOR) + except ImportError: + # proton not on path, can't determine version + PN_VERSION = (0, 0) + except AttributeError: + # prior to 0.8 proton did not expose version info + PN_VERSION = (0, 7) + PN_TX_VERSION = (0, 9) amqp_tx_supported = PN_VERSION >= PN_TX_VERSION @@ -501,7 +509,12 @@ class BrokerTest(TestCase): @classmethod def amqp_tx_warning(cls): if not cls.amqp_tx_supported: - print "WARNING: Cannot test transactions over AMQP 1.0, proton version %s.%s < %s.%s" % (cls.PN_VERSION + cls.PN_TX_VERSION) + if cls.PN_VERSION == (0, 0): + print "WARNING: Cannot test transactions over AMQP 1.0, proton not on path so version could not be determined" + elif cls.PN_VERSION == (0, 7): + print "WARNING: Cannot test transactions over AMQP 1.0, proton version is 0.7 or less, %s.%s required" % cls.PN_TX_VERSION + else: + print "WARNING: Cannot test transactions over AMQP 1.0, proton version %s.%s < %s.%s" % (cls.PN_VERSION + cls.PN_TX_VERSION) return False return True |
