diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-03-05 14:39:40 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-03-05 14:39:40 +0000 |
| commit | e8966c3c7752bfeb7eb37573c641fe7d10bdd38e (patch) | |
| tree | 386f438767571c173c679fa80bb4e180f8bf9e5d /qpid/python/tests | |
| parent | bcc71fc695435b1a26392325c216bec845831b48 (diff) | |
| download | qpid-python-e8966c3c7752bfeb7eb37573c641fe7d10bdd38e.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@633861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests')
| -rw-r--r-- | qpid/python/tests/connection010.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/qpid/python/tests/connection010.py b/qpid/python/tests/connection010.py index 5e4bf983da..8adf20fd78 100644 --- a/qpid/python/tests/connection010.py +++ b/qpid/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" |
