summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2014-07-24 13:48:37 +0000
committerGordon Sim <gsim@apache.org>2014-07-24 13:48:37 +0000
commitf87df8d18a1fa100fc862ad2160cadd3d9de9a9f (patch)
tree70294b3dbe613ac566df4b0e4b7cacf38151ae26
parent411991ff17bb52f2887f9b78350683c939b3394a (diff)
downloadqpid-python-f87df8d18a1fa100fc862ad2160cadd3d9de9a9f.tar.gz
QPID-5921, QPID-5923: adjustments and exclusions for new tests using swigged client
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1613131 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/tests/failing-amqp0-10-python-tests6
-rw-r--r--qpid/cpp/src/tests/failing-amqp1.0-python-tests3
-rw-r--r--qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py23
3 files changed, 26 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/failing-amqp0-10-python-tests b/qpid/cpp/src/tests/failing-amqp0-10-python-tests
index d69cc272c0..afa263217f 100644
--- a/qpid/cpp/src/tests/failing-amqp0-10-python-tests
+++ b/qpid/cpp/src/tests/failing-amqp0-10-python-tests
@@ -24,3 +24,9 @@ qpid.tests.messaging.message.MessageEchoTests.testReplyTo
qpid.tests.messaging.message.MessageEchoTests.testReplyToQueue
qpid.tests.messaging.message.MessageEchoTests.testReplyToQueueSubject
qpid.tests.messaging.message.MessageEchoTests.testProperties
+
+# The following test fails because the swig client throws an error
+# when creating a sender with a node name that is ambiguous and no
+# type specified. By contrast the pure python client defaults to the
+# queue in this case.
+qpid_tests.broker_0_10.new_api.GeneralTests.test_node_disambiguation_2
diff --git a/qpid/cpp/src/tests/failing-amqp1.0-python-tests b/qpid/cpp/src/tests/failing-amqp1.0-python-tests
index c15aa3fe13..e76d05d7be 100644
--- a/qpid/cpp/src/tests/failing-amqp1.0-python-tests
+++ b/qpid/cpp/src/tests/failing-amqp1.0-python-tests
@@ -20,3 +20,6 @@
qpid_tests.broker_0_10.new_api.GeneralTests.test_qpid_3481_acquired_to_alt_exchange_2_consumers
qpid_tests.broker_0_10.new_api.GeneralTests.test_qpid_3481_acquired_to_alt_exchange
qpid_tests.broker_0_10.new_api.GeneralTests.test_nolocal_rerouted
+qpid_tests.broker_0_10.new_api.GeneralTests.test_ambiguous_delete_1
+qpid_tests.broker_0_10.new_api.GeneralTests.test_ambiguous_delete_2
+qpid_tests.broker_0_10.new_api.GeneralTests.test_node_disambiguation_2
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py b/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py
index 4625733e30..4e94395121 100644
--- a/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py
+++ b/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py
@@ -178,34 +178,45 @@ class GeneralTests(Base):
except Empty: pass
self.assertEqual(received, ["a", "c"])
- def _node_disambiguation_test(self, e, q):
+ def _node_disambiguation_test(self, e, q, ambiguous_send=False):
s1 = self.ssn.sender("ambiguous; {node:{type:topic}}");
s2 = self.ssn.sender("ambiguous; {node:{type:queue}}");
- s3 = self.ssn.sender("ambiguous");
s1.send(Message("a"))
s2.send(Message("b"))
- s3.send(Message("c"))
+ if ambiguous_send:
+ # pure python client defaults to using the queue when the
+ # node name is ambiguous and no type is specified; the
+ # swigged version treats this as an error
+ s3 = self.ssn.sender("ambiguous");
+ s3.send(Message("c"))
self.assertEqual(e.fetch().content, "a")
self.assertEqual(q.fetch().content, "b")
- self.assertEqual(q.fetch().content, "c")
+ if ambiguous_send:
+ self.assertEqual(q.fetch().content, "c")
for r in [e, q]:
try:
m = r.fetch(timeout=0)
self.fail("Found unexpected message %s")
except Empty: pass
- def test_node_disambiguation(self):
+ def _node_disambiguation_precreated(self, ambiguous_send):
agent = BrokerAgent(self.conn)
agent.addExchange("fanout", "ambiguous")
agent.addQueue("ambiguous")
try:
r1 = self.ssn.receiver("ambiguous; {node:{type:topic}}")
r2 = self.ssn.receiver("ambiguous; {node:{type:queue}}")
- self._node_disambiguation_test(r1, r2)
+ self._node_disambiguation_test(r1, r2, ambiguous_send=ambiguous_send)
finally:
agent.delExchange("ambiguous")
agent.delQueue("ambiguous", False, False)
+ def test_node_disambiguation_1(self):
+ self._node_disambiguation_precreated(False)
+
+ def test_node_disambiguation_2(self):
+ self._node_disambiguation_precreated(True)
+
def test_ambiguous_create_1(self):
#create queue first, then exchange
r1 = self.ssn.receiver("ambiguous; {create:receiver, node:{type:queue}}")