diff options
author | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-17 21:12:08 +0000 |
---|---|---|
committer | Carl C. Trieloff <cctrieloff@apache.org> | 2007-07-17 21:12:08 +0000 |
commit | 000e147ca5c9253c5ce3ff46d7664e97efdb8479 (patch) | |
tree | ad969ca3280965c49d62d4a1e3f81f5df4e2221e | |
parent | f4553ccc65c43e9dab7c5c3a5f85ac3efdc1bf78 (diff) | |
download | qpid-python-000e147ca5c9253c5ce3ff46d7664e97efdb8479.tar.gz |
fixed raise issue in test
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557057 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | python/tests_0-9/basic.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/tests_0-9/basic.py b/python/tests_0-9/basic.py index ad4cb29c71..75633908cd 100644 --- a/python/tests_0-9/basic.py +++ b/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) |