Author: gsim
Date: Thu Jul 24 13:48:37 2014
New Revision: 1613131

URL: http://svn.apache.org/r1613131
Log:
QPID-5921, QPID-5923: adjustments and exclusions for new tests using swigged 
client

Modified:
    qpid/trunk/qpid/cpp/src/tests/failing-amqp0-10-python-tests
    qpid/trunk/qpid/cpp/src/tests/failing-amqp1.0-python-tests
    qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py

Modified: qpid/trunk/qpid/cpp/src/tests/failing-amqp0-10-python-tests
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/failing-amqp0-10-python-tests?rev=1613131&r1=1613130&r2=1613131&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/failing-amqp0-10-python-tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/failing-amqp0-10-python-tests Thu Jul 24 
13:48:37 2014
@@ -24,3 +24,9 @@ qpid.tests.messaging.message.MessageEcho
 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

Modified: qpid/trunk/qpid/cpp/src/tests/failing-amqp1.0-python-tests
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/failing-amqp1.0-python-tests?rev=1613131&r1=1613130&r2=1613131&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/failing-amqp1.0-python-tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/failing-amqp1.0-python-tests Thu Jul 24 
13:48:37 2014
@@ -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

Modified: qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py?rev=1613131&r1=1613130&r2=1613131&view=diff
==============================================================================
--- qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py (original)
+++ qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/new_api.py Thu Jul 24 
13:48:37 2014
@@ -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}}")



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to