diff options
| author | Gordon Sim <gsim@apache.org> | 2007-06-06 16:39:03 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-06-06 16:39:03 +0000 |
| commit | 638e704cbfb99eb912619bb5d54793c52f7182ab (patch) | |
| tree | 1aa9cc9a6ca428df842f597c71bdff538d78309d /qpid/python/tests_0-9 | |
| parent | ac1cb6fa2c823aada1aed25369cfc1f688917140 (diff) | |
| download | qpid-python-638e704cbfb99eb912619bb5d54793c52f7182ab.tar.gz | |
Merged in channel.flow implementation and interoperability tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@544879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/tests_0-9')
| -rw-r--r-- | qpid/python/tests_0-9/broker.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qpid/python/tests_0-9/broker.py b/qpid/python/tests_0-9/broker.py index a978993891..30eda03d48 100644 --- a/qpid/python/tests_0-9/broker.py +++ b/qpid/python/tests_0-9/broker.py @@ -114,3 +114,20 @@ class BrokerTests(TestBase): self.assertEqual(reply.method.klass.name, "channel") self.assertEqual(reply.method.name, "ok") #todo: provide a way to get notified of incoming pongs... + + def test_channel_flow(self): + channel = self.channel + channel.queue_declare(queue="flow_test_queue", exclusive=True) + channel.message_consume(destination="my-tag", queue="flow_test_queue") + incoming = self.client.queue("my-tag") + + channel.channel_flow(active=False) + channel.message_transfer(routing_key="flow_test_queue", body="abcdefghijklmnopqrstuvwxyz") + try: + incoming.get(timeout=1) + self.fail("Received message when flow turned off.") + except Empty: None + + channel.channel_flow(active=True) + msg = incoming.get(timeout=1) + self.assertEqual("abcdefghijklmnopqrstuvwxyz", msg.body) |
