summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-10-04 18:51:13 +0000
committerJonathan Robie <jonathan@apache.org>2010-10-04 18:51:13 +0000
commit03b1fdb3ca817c919b81caca35d5a936b185d77a (patch)
tree60d4ad45a4de8382f5620b5685d42e625ac40e72 /cpp/src/tests
parentc542729c5030728e310660b6fa22972de7a7b62c (diff)
downloadqpid-python-03b1fdb3ca817c919b81caca35d5a936b185d77a.tar.gz
Allows browsing of exclusive queues held by another session.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1004357 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/MessagingSessionTests.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp
index 66ce061b73..fc1632b4e1 100644
--- a/cpp/src/tests/MessagingSessionTests.cpp
+++ b/cpp/src/tests/MessagingSessionTests.cpp
@@ -771,6 +771,25 @@ QPID_AUTO_TEST_CASE(testExclusiveSubscriber)
} catch (const MessagingException& /*e*/) {}
}
+
+QPID_AUTO_TEST_CASE(testExclusiveQueueSubscriberAndBrowser)
+{
+ MessagingFixture fix;
+
+ std::string address = "exclusive-queue; { create: receiver, node : { x-declare : { auto-delete: true, exclusive: true } } }";
+ std::string browseAddress = "exclusive-queue; { mode: browse }";
+
+ Receiver receiver = fix.session.createReceiver(address);
+ fix.session.sync();
+
+ Connection c2 = fix.newConnection();
+ c2.open();
+ Session s2 = c2.createSession();
+
+ BOOST_CHECK_NO_THROW(Receiver browser = s2.createReceiver(browseAddress));
+ c2.close();
+}
+
QPID_AUTO_TEST_CASE(testAuthenticatedUsername)
{
MessagingFixture fix;