summaryrefslogtreecommitdiff
path: root/cpp/src/tests/QueuePolicyTest.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-11-10 16:51:16 +0000
committerGordon Sim <gsim@apache.org>2010-11-10 16:51:16 +0000
commitab65488008895376c5f74ead6d1cc5d2568fd8a5 (patch)
tree76790c4c0757bd704ba842c611e02d069c84d4e2 /cpp/src/tests/QueuePolicyTest.cpp
parent9071df0ec8ac19dfa486808249286b8428162781 (diff)
downloadqpid-python-ab65488008895376c5f74ead6d1cc5d2568fd8a5.tar.gz
Fix to r1028346: no point in throwing exception after queue has already been created, so just log error and revert to default (do this for floating point values also)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1033585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/QueuePolicyTest.cpp')
-rw-r--r--cpp/src/tests/QueuePolicyTest.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/tests/QueuePolicyTest.cpp b/cpp/src/tests/QueuePolicyTest.cpp
index 5992151e46..90af9c7dd9 100644
--- a/cpp/src/tests/QueuePolicyTest.cpp
+++ b/cpp/src/tests/QueuePolicyTest.cpp
@@ -378,6 +378,24 @@ QPID_AUTO_TEST_CASE(testPolicyFailureOnCommit)
BOOST_CHECK_THROW(f.session.txCommit(), InternalErrorException);
}
+QPID_AUTO_TEST_CASE(testCapacityConversion)
+{
+ FieldTable args;
+ args.setString("qpid.max_count", "5");
+
+ ProxySessionFixture f;
+ std::string q("q");
+ f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
+ for (int i = 0; i < 5; i++) {
+ f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q));
+ }
+ try {
+ ScopedSuppressLogging sl; // Suppress messages for expected errors.
+ f.session.messageTransfer(arg::content=client::Message("Message_6", q));
+ BOOST_FAIL("expecting ResourceLimitExceededException.");
+ } catch (const ResourceLimitExceededException&) {}
+}
+
QPID_AUTO_TEST_SUITE_END()
}} // namespace qpid::tests