diff options
| author | Gordon Sim <gsim@apache.org> | 2011-02-15 18:58:44 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2011-02-15 18:58:44 +0000 |
| commit | 8d1696bd02332cbe7afc929d88d8e7bce73c8f2d (patch) | |
| tree | bd284a09a32498c16aad18c5d4f162c5332c9802 /qpid/tests | |
| parent | e9cbb2646bdc51c5ae9e0e899231f017e9d9d20d (diff) | |
| download | qpid-python-8d1696bd02332cbe7afc929d88d8e7bce73c8f2d.tar.gz | |
QPID-3000: Added optional delay for auto-deletion
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1071013 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tests')
| -rw-r--r-- | qpid/tests/src/py/qpid_tests/broker_0_10/__init__.py | 1 | ||||
| -rw-r--r-- | qpid/tests/src/py/qpid_tests/broker_0_10/extensions.py | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/__init__.py b/qpid/tests/src/py/qpid_tests/broker_0_10/__init__.py index 46d56ee0c0..921786af22 100644 --- a/qpid/tests/src/py/qpid_tests/broker_0_10/__init__.py +++ b/qpid/tests/src/py/qpid_tests/broker_0_10/__init__.py @@ -32,3 +32,4 @@ from tx import * from lvq import * from priority import * from threshold import * +from extensions import * diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/extensions.py b/qpid/tests/src/py/qpid_tests/broker_0_10/extensions.py new file mode 100644 index 0000000000..26ea3cb0e9 --- /dev/null +++ b/qpid/tests/src/py/qpid_tests/broker_0_10/extensions.py @@ -0,0 +1,37 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +from qpid.client import Client, Closed +from qpid.queue import Empty +from qpid.content import Content +from qpid.testlib import TestBase010 +from time import sleep + +class ExtensionTests(TestBase010): + """Tests for various extensions to AMQP 0-10""" + + def test_timed_autodelete(self): + session = self.session + session2 = self.conn.session("another-session") + session2.queue_declare(queue="my-queue", exclusive=True, auto_delete=True, arguments={"qpid.auto_delete_timeout":5}) + session2.close() + result = session.queue_query(queue="my-queue") + self.assertEqual("my-queue", result.queue) + sleep(5) + result = session.queue_query(queue="my-queue") + self.assert_(not result.queue) |
