From 3abc57827f2e21dcfeb751056d58143e12399c1a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 19 Jul 2007 21:52:24 +0000 Subject: * Summary: - Connect cluster handlers into broker handler chains. - Progress on wiring replication. * src/tests/cluster.mk: Temporarily disabled Cluster test. * src/tests/Cluster.h, cpp, Cluster_child.cpp: Updated to use UUIDs. * src/qpidd.cpp: - Load optional libs (cluster) - Include plugin config in options.parse. * src/qpid/cluster/SessionManager.h: - Create sessions, update handler chains (as HandlerUpdater) - Handle frames from cluster. * src/qpid/cluster/ClusterPlugin.h, .cpp: - renamed from ClusterPluginProvider - Create and connect Cluster and SessionManager. - Register SessionManager as HandlerUpdater. * src/qpid/cluster/Cluster.h, .cpp: Refactor as SessionFrameHandler. * src/qpid/broker/Connection.cpp: Apply HandlerUpdaters. * src/qpid/broker/Broker.h, .cpp: - Initialize plugins - Apply HandlerUpdaters * src/qpid/Plugin.h, .cpp: Simplified plugin framework. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@557788 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/Cluster.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/src/tests/Cluster.cpp') diff --git a/qpid/cpp/src/tests/Cluster.cpp b/qpid/cpp/src/tests/Cluster.cpp index 2e6d9ecfff..56e17e06db 100644 --- a/qpid/cpp/src/tests/Cluster.cpp +++ b/qpid/cpp/src/tests/Cluster.cpp @@ -36,11 +36,14 @@ using namespace qpid::log; BOOST_AUTO_TEST_CASE(testClusterOne) { TestCluster cluster("clusterOne", "amqp:one:1"); AMQFrame frame(VER, 1, new ChannelPingBody(VER)); - cluster.getSendChains().in->handle(frame); + Uuid id(true); + SessionFrame send(id, frame, true); + cluster.handle(send); BOOST_REQUIRE(cluster.received.waitFor(1)); SessionFrame& sf=cluster.received[0]; BOOST_CHECK(sf.isIncoming); + BOOST_CHECK_EQUAL(id, sf.uuid); BOOST_CHECK_TYPEID_EQUAL(ChannelPingBody, *sf.frame.getBody()); BOOST_CHECK_EQUAL(1u, cluster.size()); @@ -60,9 +63,12 @@ BOOST_AUTO_TEST_CASE(testClusterTwo) { // Exchange frames with child. AMQFrame frame(VER, 1, new ChannelPingBody(VER)); - cluster.getSendChains().in->handle(frame); + Uuid id(true); + SessionFrame send(id, frame, true); + cluster.handle(send); BOOST_REQUIRE(cluster.received.waitFor(1)); SessionFrame& sf=cluster.received[0]; + BOOST_CHECK_EQUAL(id, sf.uuid); BOOST_CHECK(sf.isIncoming); BOOST_CHECK_TYPEID_EQUAL(ChannelPingBody, *sf.frame.getBody()); BOOST_REQUIRE(cluster.received.waitFor(2)); -- cgit v1.2.1