From 3b5328e72148757fb88e77b953016c9d2aabb9d8 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 16 Feb 2007 12:03:37 +0000 Subject: Updated failing list for java (some of these result in test suite blocking) Added better error handling when connection closes without close method git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@508377 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/testlib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/qpid/testlib.py') diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py index 836315a4e3..793698ca31 100644 --- a/python/qpid/testlib.py +++ b/python/qpid/testlib.py @@ -26,6 +26,7 @@ import qpid.client, qpid.spec import Queue from getopt import getopt, GetoptError from qpid.content import Content +from qpid.message import Message def findmodules(root): """Find potential python modules under directory root""" @@ -233,13 +234,15 @@ class TestBase(unittest.TestCase): """ self.assertPublishGet(self.consume(queue), exchange, routing_key, properties) - def assertChannelException(self, expectedCode, message): + def assertChannelException(self, expectedCode, message): + if not isinstance(message, Message): self.fail("expected channel_close method") self.assertEqual("channel", message.method.klass.name) self.assertEqual("close", message.method.name) self.assertEqual(expectedCode, message.reply_code) def assertConnectionException(self, expectedCode, message): + if not isinstance(message, Message): self.fail("expected connection_close method") self.assertEqual("connection", message.method.klass.name) self.assertEqual("close", message.method.name) self.assertEqual(expectedCode, message.reply_code) -- cgit v1.2.1