diff options
author | Gordon Sim <gsim@apache.org> | 2009-05-27 17:00:47 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-05-27 17:00:47 +0000 |
commit | fcb9f8b0bd5bc48e101c02d4831eed8277e4ba35 (patch) | |
tree | 80f2f1c1d2fd2ba1f7fe929fe49f39e27f5daa43 /cpp/src/tests/cluster_test.cpp | |
parent | b6780b5b42b168c62a3380e5fc15cc39fc374615 (diff) | |
download | qpid-python-fcb9f8b0bd5bc48e101c02d4831eed8277e4ba35.tar.gz |
QPID-1873: Further test case contributed by Mick Goulish.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_test.cpp')
-rw-r--r-- | cpp/src/tests/cluster_test.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpp/src/tests/cluster_test.cpp b/cpp/src/tests/cluster_test.cpp index 64b3ea65f1..611911d126 100644 --- a/cpp/src/tests/cluster_test.cpp +++ b/cpp/src/tests/cluster_test.cpp @@ -694,8 +694,33 @@ QPID_AUTO_TEST_CASE(testDequeueWaitingSubscription) { BOOST_CHECK_EQUAL(0u, c2.session.queueQuery("q").getMessageCount()); } +QPID_AUTO_TEST_CASE(queueDurabilityPropagationToNewbie) +{ + /* + Start with a single broker. + Set up two queues: one durable, and one not. + Add a new broker to the cluster. + Make sure it has one durable and one non-durable queue. + */ + ClusterFixture::Args args; + prepareArgs(args, durableFlag); + ClusterFixture cluster(1, args); + Client c0(cluster[0]); + c0.session.queueDeclare("durable_queue", arg::durable=true); + c0.session.queueDeclare("non_durable_queue", arg::durable=false); + cluster.add(); + Client c1(cluster[1]); + QueueQueryResult durable_query = c1.session.queueQuery ( "durable_queue" ); + QueueQueryResult non_durable_query = c1.session.queueQuery ( "non_durable_queue" ); + + BOOST_CHECK_EQUAL ( durable_query.getDurable(), true ); + BOOST_CHECK_EQUAL ( non_durable_query.getDurable(), false ); +} + + QPID_AUTO_TEST_CASE(testHeartbeatCancelledOnFailover) { + struct Sender : FailoverManager::Command { std::string queue; |