diff options
| author | Alan Conway <aconway@apache.org> | 2012-04-17 15:12:15 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-04-17 15:12:15 +0000 |
| commit | 95e371124817b222fc53df491469df0e8503d24c (patch) | |
| tree | 4b50fdeffc3bb75e1b0ad2ba6bfa7fe76b019020 /qpid/cpp/src/tests | |
| parent | c8d206abb661ade5e113ba7950e5d8b90a0b29ef (diff) | |
| download | qpid-python-95e371124817b222fc53df491469df0e8503d24c.tar.gz | |
QPID-3950: Allow browsing of queues with exclusive subscriptions
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1327135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rwxr-xr-x | qpid/cpp/src/tests/ha_tests.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index 740b695278..e251e4d8c8 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -19,7 +19,7 @@ # import os, signal, sys, time, imp, re, subprocess, glob, random, logging, shutil, math -from qpid.messaging import Message, NotFound, ConnectionError, Connection +from qpid.messaging import Message, NotFound, ConnectionError, ReceiverError, Connection from qpid.datatypes import uuid4 from brokertest import * from threading import Thread, Lock, Condition @@ -548,6 +548,20 @@ class ReplicationTests(HaTest): c = cluster[0].connect().session().sender("q;{create:always, node:{x-declare:{arguments:{'qpid.replicate':XXinvalidXX}}}}") self.wait_backup(cluster[1], "q") + def test_exclusive_queue(self): + """Ensure that we can back-up exclusive queues, i.e. the replicating + subscriptions are exempt from the exclusivity""" + cluster = HaCluster(self, 2) + def test(addr): + c = cluster[0].connect() + q = addr.split(";")[0] + r = c.session().receiver(addr) + try: c.session().receiver(addr); self.fail("Expected exclusive exception") + except ReceiverError: pass + s = c.session().sender(q).send(q) + self.assert_browse_backup(cluster[1], q, [q]) + test("excl_sub;{create:always, link:{x-subscribe:{exclusive:True}}}"); + test("excl_queue;{create:always, node:{x-declare:{exclusive:True}}}") def fairshare(msgs, limit, levels): """ |
