summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/Cluster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-30 17:06:44 +0000
committerAlan Conway <aconway@apache.org>2007-08-30 17:06:44 +0000
commitfe3043fa600e1294631a324a39a9302938bf8016 (patch)
tree1f680ee6e6908ddd6afa1a53ad81f1415798fc6e /qpid/cpp/src/tests/Cluster.cpp
parentcfaa5d0d31a387cd0634b7498201d1620d905a46 (diff)
downloadqpid-python-fe3043fa600e1294631a324a39a9302938bf8016.tar.gz
- Update cluster code to work with new FrameHandler
- Update ClassifierHandler to use Visitor rather than map. - Replace heap allocation in cluster classes with boost::optional. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@571246 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/Cluster.cpp')
-rw-r--r--qpid/cpp/src/tests/Cluster.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/Cluster.cpp b/qpid/cpp/src/tests/Cluster.cpp
index b3a6a745b8..531a74b0c2 100644
--- a/qpid/cpp/src/tests/Cluster.cpp
+++ b/qpid/cpp/src/tests/Cluster.cpp
@@ -42,8 +42,8 @@ BOOST_AUTO_TEST_CASE(testClusterOne) {
BOOST_CHECK_EQUAL(1u, cluster.size());
Cluster::MemberList members = cluster.getMembers();
BOOST_CHECK_EQUAL(1u, members.size());
- shared_ptr<const Cluster::Member> me=members.front();
- BOOST_REQUIRE_EQUAL(me->url, "amqp:one:1");
+ Cluster::Member me=members.front();
+ BOOST_REQUIRE_EQUAL(me.url, "amqp:one:1");
}
/** Fork a process to test a cluster with two members */
@@ -93,18 +93,18 @@ struct CountHandler : public FrameHandler {
BOOST_AUTO_TEST_CASE(testClassifierHandlerWiring) {
AMQFrame queueDecl(0, QueueDeclareBody(VER));
AMQFrame messageTrans(0, MessageTransferBody(VER));
- shared_ptr<CountHandler> wiring(new CountHandler());
- shared_ptr<CountHandler> other(new CountHandler());
+ CountHandler wiring;
+ CountHandler other;
ClassifierHandler classify(wiring, other);
classify.handle(queueDecl);
- BOOST_CHECK_EQUAL(1u, wiring->count);
- BOOST_CHECK_EQUAL(0u, other->count);
+ BOOST_CHECK_EQUAL(1u, wiring.count);
+ BOOST_CHECK_EQUAL(0u, other.count);
classify.handle(messageTrans);
- BOOST_CHECK_EQUAL(1u, wiring->count);
- BOOST_CHECK_EQUAL(1u, other->count);
+ BOOST_CHECK_EQUAL(1u, wiring.count);
+ BOOST_CHECK_EQUAL(1u, other.count);
}