summaryrefslogtreecommitdiff
path: root/qpid/python/tests_0-9/basic.py
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2007-07-17 21:12:08 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2007-07-17 21:12:08 +0000
commit35d50318300dcad92e5f7c7210fc74f880c3e655 (patch)
treeba3b0f16fe2613f9a8ed041d4b6caf885dae6253 /qpid/python/tests_0-9/basic.py
parentcc87adf8a797ebd858f9296e2b43ebae2f854311 (diff)
downloadqpid-python-35d50318300dcad92e5f7c7210fc74f880c3e655.tar.gz
fixed raise issue in test
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@557057 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests_0-9/basic.py')
-rw-r--r--qpid/python/tests_0-9/basic.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/python/tests_0-9/basic.py b/qpid/python/tests_0-9/basic.py
index ad4cb29c71..75633908cd 100644
--- a/qpid/python/tests_0-9/basic.py
+++ b/qpid/python/tests_0-9/basic.py
@@ -125,13 +125,14 @@ class BasicTests(TestBase):
channel.queue_declare(queue="test-queue-4", exclusive=True)
channel.basic_consume(consumer_tag="my-consumer", queue="test-queue-4")
channel.basic_publish(routing_key="test-queue-4", content=Content("One"))
- import time; time.sleep(5) # this should be replace waiting for confirm of publish once we have message class
- #cancel should stop messages being delivered
- channel.basic_cancel(consumer_tag="my-consumer")
- channel.basic_publish(routing_key="test-queue-4", content=Content("Two"))
+
myqueue = self.client.queue("my-consumer")
msg = myqueue.get(timeout=5)
self.assertEqual("One", msg.content.body)
+
+ #cancel should stop messages being delivered
+ channel.basic_cancel(consumer_tag="my-consumer")
+ channel.basic_publish(routing_key="test-queue-4", content=Content("Two"))
try:
msg = myqueue.get(timeout=1)
self.fail("Got message after cancellation: " + msg)