diff options
author | Alan Conway <aconway@apache.org> | 2008-08-29 18:18:45 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-08-29 18:18:45 +0000 |
commit | 9749e6774159c43750f04907574d371235e36c0a (patch) | |
tree | a04aa3d5171ad59a82e82cec4a18e691dce56378 /cpp/src/tests/cluster_test.cpp | |
parent | 7a7273f69fdd328de06db16347914a20ae758b2b (diff) | |
download | qpid-python-9749e6774159c43750f04907574d371235e36c0a.tar.gz |
Refactored cluster to intercept at ConnectionCode, using sys:: interfaces rather than boost functions.
Use framing::Operations and Invoker to dispatch cluster methods.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@690358 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_test.cpp')
-rw-r--r-- | cpp/src/tests/cluster_test.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/tests/cluster_test.cpp b/cpp/src/tests/cluster_test.cpp index 7140cc73bd..3f09143fff 100644 --- a/cpp/src/tests/cluster_test.cpp +++ b/cpp/src/tests/cluster_test.cpp @@ -69,8 +69,8 @@ struct ClusterFixture : public vector<uint16_t> { void add(); void setup(); void kill(size_t n) { - if (n) forkedBrokers[n-1]->stop(); - else broker0.shutdown(); + if (n) forkedBrokers[n-1].kill(); + else broker0->broker->shutdown(); } }; @@ -139,6 +139,14 @@ QPID_AUTO_TEST_CASE(testForkedBroker) { BOOST_CHECK_EQUAL("direct", c.session.exchangeQuery("amq.direct").getType()); } +QPID_AUTO_TEST_CASE(testSingletonCluster) { + // Test against a singleton cluster, verify basic operation. + ClusterFixture cluster(1); + Client c(cluster[0]); + BOOST_CHECK(c.session.queueQuery("q").getQueue().empty()); + BOOST_CHECK(c.session.exchangeQuery("ex").getType().empty()); +} + QPID_AUTO_TEST_CASE(testWiringReplication) { ClusterFixture cluster(3); Client c0(cluster[0]); |