summaryrefslogtreecommitdiff
path: root/python/qpid/tests/messaging.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-01-22 20:09:58 +0000
committerRafael H. Schloming <rhs@apache.org>2010-01-22 20:09:58 +0000
commit20dba34f5764cde62d64241ff47cd5ee8a239cd9 (patch)
tree70e55aa2f024befc5d06fb20ead7352b7d9f73ae /python/qpid/tests/messaging.py
parent6d79c93d2d895e19acaf571f5eaf52202919e6b1 (diff)
downloadqpid-python-20dba34f5764cde62d64241ff47cd5ee8a239cd9.tar.gz
made bindings additive, improved message level logging
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@902246 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/tests/messaging.py')
-rw-r--r--python/qpid/tests/messaging.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/python/qpid/tests/messaging.py b/python/qpid/tests/messaging.py
index ba33ab9e80..7bcbc455af 100644
--- a/python/qpid/tests/messaging.py
+++ b/python/qpid/tests/messaging.py
@@ -718,6 +718,47 @@ test-bindings-queue; {
rcv = self.ssn.receiver("test-bindings-queue")
self.drain(rcv, expected=["one", "two", "three", "four"])
+ def testBindingsAdditive(self):
+ m1 = self.content("testBindingsAdditive", 1)
+ m2 = self.content("testBindingsAdditive", 2)
+ m3 = self.content("testBindingsAdditive", 3)
+ m4 = self.content("testBindingsAdditive", 4)
+
+ snd = self.ssn.sender("""
+test-bindings-additive-queue; {
+ create: always,
+ delete: always,
+ node-properties: {
+ x-properties: {
+ bindings: ["amq.topic/a"]
+ }
+ }
+}
+""")
+
+ snd_a = self.ssn.sender("amq.topic/a")
+ snd_b = self.ssn.sender("amq.topic/b")
+
+ snd_a.send(m1)
+ snd_b.send(m2)
+
+ rcv = self.ssn.receiver("test-bindings-additive-queue")
+ self.drain(rcv, expected=[m1])
+
+ new_snd = self.ssn.sender("""
+test-bindings-additive-queue; {
+ node-properties: {
+ x-properties: {
+ bindings: ["amq.topic/b"]
+ }
+ }
+}
+""")
+
+ new_snd.send(m3)
+ snd_b.send(m4)
+ self.drain(rcv, expected=[m3, m4])
+
NOSUCH_Q = "this-queue-should-not-exist"
UNPARSEABLE_ADDR = "name/subject; {bad options"
UNLEXABLE_ADDR = "\0x0\0x1\0x2\0x3"