summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_test.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-11-02 22:08:17 +0000
committerAlan Conway <aconway@apache.org>2009-11-02 22:08:17 +0000
commit25c77547d05ac41830ed1a7aa1cdf1869cccbaa1 (patch)
treee31cd81bf3a88f5d90eb02fccc63874b3de5e0f0 /qpid/cpp/src/tests/cluster_test.cpp
parent01da0dcc166152a95480263209e84300ee4321d9 (diff)
downloadqpid-python-25c77547d05ac41830ed1a7aa1cdf1869cccbaa1.tar.gz
Fix leak in SASL code, enable cluster ACL test.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@832134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster_test.cpp')
-rw-r--r--qpid/cpp/src/tests/cluster_test.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/cluster_test.cpp b/qpid/cpp/src/tests/cluster_test.cpp
index de8ec49ea6..eb6d98eced 100644
--- a/qpid/cpp/src/tests/cluster_test.cpp
+++ b/qpid/cpp/src/tests/cluster_test.cpp
@@ -222,10 +222,6 @@ QPID_AUTO_TEST_CASE(testBadClientData) {
BOOST_CHECK_EQUAL(c1.session.queueQuery("q1").getQueue(), "");
}
-#if 0
-// FIXME aconway 2009-03-10: This test passes but exposes a memory
-// leak in the SASL client code. Enable it when the leak is fixed.
-
QPID_AUTO_TEST_CASE(testAcl) {
ofstream policyFile("cluster_test.acl");
policyFile << "acl allow foo@QPID create queue name=foo" << endl
@@ -239,6 +235,7 @@ QPID_AUTO_TEST_CASE(testAcl) {
aclLib << getLibPath("ACL_LIB", "../.libs/acl.so");
ClusterFixture::Args args;
prepareArgs(args, durableFlag);
+ args += "--log-enable=critical"; // Supress expected errors
args += "--acl-file", string(cwd) + "/cluster_test.acl",
"--cluster-mechanism", "PLAIN",
"--cluster-username", "cluster",
@@ -253,18 +250,22 @@ QPID_AUTO_TEST_CASE(testAcl) {
foo.session.queueDeclare("foo", arg::durable=durableFlag);
BOOST_CHECK_EQUAL(c0.session.queueQuery("foo").getQueue(), "foo");
- BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::NotAllowedException);
+ {
+ ScopedSuppressLogging sl;
+ BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::NotAllowedException);
+ }
BOOST_CHECK(c0.session.queueQuery("bar").getQueue().empty());
BOOST_CHECK(c1.session.queueQuery("bar").getQueue().empty());
cluster.add();
Client c2(aclSettings(cluster[2], "c2"), "c2");
- BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::NotAllowedException);
+ {
+ ScopedSuppressLogging sl;
+ BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::NotAllowedException);
+ }
BOOST_CHECK(c2.session.queueQuery("bar").getQueue().empty());
}
-#endif
-
QPID_AUTO_TEST_CASE(testMessageTimeToLive) {
// Note: this doesn't actually test for cluster race conditions around TTL,
// it just verifies that basic TTL functionality works.