summaryrefslogtreecommitdiff
path: root/python/tests/connection010.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-03-05 14:39:40 +0000
committerRafael H. Schloming <rhs@apache.org>2008-03-05 14:39:40 +0000
commit86779be122dea590bc1e5201c58777ea3e362a95 (patch)
tree5867b18efe04c62c99e1ca14d177b0eda894bd82 /python/tests/connection010.py
parent00f2ca6cf33f77e44b94db2701830f8c9bcd794e (diff)
downloadqpid-python-86779be122dea590bc1e5201c58777ea3e362a95.tar.gz
added incoming queues for messages; altered session dispatch to send entire assembly to a single handler; added logging switch for hello-010-world
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests/connection010.py')
-rw-r--r--python/tests/connection010.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/python/tests/connection010.py b/python/tests/connection010.py
index 5e4bf983da..8adf20fd78 100644
--- a/python/tests/connection010.py
+++ b/python/tests/connection010.py
@@ -50,11 +50,8 @@ class TestSession(Delegate):
def queue_query(self, qq):
return qq.type.result.type.new((qq.queue,), {})
- def message_transfer(self, cmd):
- self.queue.put(cmd)
-
- def body(self, body):
- self.queue.put(body)
+ def message_transfer(self, cmd, header, body):
+ self.queue.put((cmd, header, body))
class ConnectionTest(TestCase):
@@ -88,8 +85,8 @@ class ConnectionTest(TestCase):
c = Connection(connect("0.0.0.0", PORT), self.spec)
c.start(10)
- ssn1 = c.session("test1")
- ssn2 = c.session("test2")
+ ssn1 = c.session("test1", timeout=10)
+ ssn2 = c.session("test2", timeout=10)
assert ssn1 == c.sessions["test1"]
assert ssn2 == c.sessions["test2"]
@@ -110,7 +107,7 @@ class ConnectionTest(TestCase):
assert ssn2 not in c.attached.values()
assert ssn2 not in c.sessions.values()
- ssn = c.session("session")
+ ssn = c.session("session", timeout=10)
assert ssn.channel != None
assert ssn in c.sessions.values()
@@ -121,16 +118,17 @@ class ConnectionTest(TestCase):
ssn.message_transfer(d)
for d in destinations:
- cmd = self.queue.get(10)
+ cmd, header, body = self.queue.get(10)
assert cmd.destination == d
+ assert header == None
+ assert body == None
msg = Message("this is a test")
ssn.message_transfer("four", message=msg)
- cmd = self.queue.get(10)
+ cmd, header, body = self.queue.get(10)
assert cmd.destination == "four"
- body = self.queue.get(10)
- assert body.payload == msg.body
- assert body.last
+ assert header == None
+ assert body == msg.body
qq = ssn.queue_query("asdf")
assert qq.queue == "asdf"