From f8903ef9bf3767041bb3a8437c8423ea984e5893 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 5 Jul 2007 16:08:29 +0000 Subject: * src/qpid/cluster/SessionFrame.cpp, .h: Wrap AMQFrame with session UUID and direction. * src/qpid/cluster/Cluster.cpp, .h: Use SessionFrame. * src/qpid/framing/AMQFrame.h, .cpp: Added setBody(), inline getBody() * src/qpid/framing/Uuid.h, .cpp: Clean up constructors, inline. * src/qpid/framing/Buffer.h: Put/get byte*, size_T. * src/qpid/cluster/SessionManager.cpp, .h: - Maintain the session map. - Handle frames from cluster, dispatch to proper channels. - Implement HandlerUpdater for new channels and maintains git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@553543 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/Cluster_child.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/src/tests/Cluster_child.cpp') diff --git a/qpid/cpp/src/tests/Cluster_child.cpp b/qpid/cpp/src/tests/Cluster_child.cpp index d73d2bdbc7..216afc7bca 100644 --- a/qpid/cpp/src/tests/Cluster_child.cpp +++ b/qpid/cpp/src/tests/Cluster_child.cpp @@ -33,13 +33,16 @@ static const ProtocolVersion VER; /** Chlid part of Cluster::clusterTwo test */ void clusterTwo() { TestCluster cluster("clusterTwo", "amqp::2"); - BOOST_REQUIRE(cluster.in.waitFor(1)); // Frame from parent. - BOOST_CHECK_TYPEID_EQUAL(ChannelPingBody, *cluster.in[0].getBody()); + BOOST_REQUIRE(cluster.received.waitFor(1)); // Frame from parent. + BOOST_CHECK(cluster.received[0].isIncoming); + BOOST_CHECK_TYPEID_EQUAL(ChannelPingBody, *cluster.received[0].frame.getBody()); BOOST_CHECK_EQUAL(2u, cluster.size()); // Me and parent + AMQFrame frame(VER, 1, new ChannelOkBody(VER)); - cluster.getToChains().out->handle(frame); - BOOST_REQUIRE(cluster.out.waitFor(1)); - BOOST_CHECK_TYPEID_EQUAL(ChannelOkBody, *cluster.out[0].getBody()); + cluster.getSendChains().out->handle(frame); + BOOST_REQUIRE(cluster.received.waitFor(2)); + BOOST_CHECK(!cluster.received[1].isIncoming); + BOOST_CHECK_TYPEID_EQUAL(ChannelOkBody, *cluster.received[1].frame.getBody()); } int test_main(int, char**) { -- cgit v1.2.1