qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r1082697 - in /qpid/trunk/qpid/python/qpid: messaging/driver.py tests/messaging/endpoints.py
Date Thu, 17 Mar 2011 21:04:03 GMT
Author: rhs
Date: Thu Mar 17 21:04:03 2011
New Revision: 1082697

URL: http://svn.apache.org/viewvc?rev=1082697&view=rev
Log:
only assert if type is specified

Modified:
    qpid/trunk/qpid/python/qpid/messaging/driver.py
    qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py

Modified: qpid/trunk/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/driver.py?rev=1082697&r1=1082696&r2=1082697&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/driver.py Thu Mar 17 21:04:03 2011
@@ -941,7 +941,7 @@ class Engine:
       else:
         if assrt:
           expected = lnk.options.get("node", {}).get("type")
-          if type != expected:
+          if expected and type != expected:
             err = AssertionFailed(text="expected %s, got %s" % (expected, type))
         if err is None:
           action(type, subtype)

Modified: qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py?rev=1082697&r1=1082696&r2=1082697&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/tests/messaging/endpoints.py Thu Mar 17 21:04:03 2011
@@ -1186,13 +1186,16 @@ test-link-bindings-queue; {
       snd.send(m)
     self.drain(qrcv, expected=msgs)
 
-  def testAssert(self):
+  def testAssert1(self):
     try:
       snd = self.ssn.sender("amq.topic; {assert: always, node: {type: queue}}")
       assert 0, "assertion failed to trigger"
     except AssertionFailed, e:
       pass
 
+  def testAssert2(self):
+    snd = self.ssn.sender("amq.topic; {assert: always}")
+
 NOSUCH_Q = "this-queue-should-not-exist"
 UNPARSEABLE_ADDR = "name/subject; {bad options"
 UNLEXABLE_ADDR = "\0x0\0x1\0x2\0x3"



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message