From 521b63e9ad416df5cd98c65aa0246efbc24b7503 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Fri, 9 Feb 2007 13:44:08 +0000 Subject: * qpid/peer.py - fix to prevent race between handling of connection.close request and socket close * qpid/testlib.py - close client (if not closed) on tearDown * tests/basic.py - revert back to using exclusive queue which should now be cleaned up on tear down * tests/message.py - fix to prefetch tests git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@505287 13f79535-47bb-0310-9956-ffa450edef68 --- python/tests/basic.py | 2 +- python/tests/message.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'python/tests') diff --git a/python/tests/basic.py b/python/tests/basic.py index 0100b8ee3e..140576540a 100644 --- a/python/tests/basic.py +++ b/python/tests/basic.py @@ -147,7 +147,7 @@ class BasicTests(TestBase): Test basic ack/recover behaviour """ channel = self.channel - self.queue_declare(queue="test-ack-queue", exclusive=True) + channel.queue_declare(queue="test-ack-queue", exclusive=True) reply = channel.basic_consume(queue="test-ack-queue", no_ack=False) queue = self.client.queue(reply.consumer_tag) diff --git a/python/tests/message.py b/python/tests/message.py index 3c52c2d03c..df621ff295 100644 --- a/python/tests/message.py +++ b/python/tests/message.py @@ -277,7 +277,7 @@ class MessageTests(TestBase): #todo: once batching is implmented, send a single response for all messages for msg in msgs: msg.ok() - del msgs + msgs = [] for i in range(6, 11): msg = queue.get(timeout=1) @@ -286,7 +286,7 @@ class MessageTests(TestBase): for msg in msgs: msg.ok() - del msgs + msgs = [] try: extra = queue.get(timeout=1) @@ -317,7 +317,6 @@ class MessageTests(TestBase): for i in range(1, 6): msg = queue.get(timeout=1) self.assertEqual("Message %d" % i, msg.body) - print "Got Message %d" % i msgs.append(msg) try: @@ -328,7 +327,7 @@ class MessageTests(TestBase): #ack messages and check that the next set arrive ok: for msg in msgs: msg.ok() - del msgs + msgs = [] for i in range(6, 11): msg = queue.get(timeout=1) @@ -337,7 +336,7 @@ class MessageTests(TestBase): for msg in msgs: msg.ok() - del msgs + msgs = [] try: extra = queue.get(timeout=1) -- cgit v1.2.1