diff options
author | Alan Conway <aconway@apache.org> | 2007-11-22 23:55:39 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-11-22 23:55:39 +0000 |
commit | cb070d9813e4232b4ec8409ca555b529ee5cee4b (patch) | |
tree | 7f8ed15de2c4f933db59b79b52222c70f2a2a240 /cpp/src/tests/Cluster.cpp | |
parent | 4d16c847bd0868ac8ff3039ce22fcdae28606aeb (diff) | |
download | qpid-python-cb070d9813e4232b4ec8409ca555b529ee5cee4b.tar.gz |
Added framing::BodyHolder:
- Uniform holder for all body types, replaces MethodHolder.
- Uses in_place constructors to avoid avoid body copy.
framing::AMQFrame:
- Holds body in heap-allocated intrusive_ptr<BodyHolder>
- Uses in_place constructors to avoid avoid body copy.
Removed/downgraded to TODO many redundant FIXME comments.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@597513 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Cluster.cpp')
-rw-r--r-- | cpp/src/tests/Cluster.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cpp/src/tests/Cluster.cpp b/cpp/src/tests/Cluster.cpp index 80ff6d9544..635126053f 100644 --- a/cpp/src/tests/Cluster.cpp +++ b/cpp/src/tests/Cluster.cpp @@ -34,7 +34,8 @@ static const ProtocolVersion VER; /** Verify membership in a cluster with one member. */ BOOST_AUTO_TEST_CASE(testClusterOne) { TestCluster cluster("clusterOne", "amqp:one:1"); - AMQFrame send(1, SessionOpenBody(VER)); + AMQFrame send(in_place<SessionOpenBody>(VER)); + send.setChannel(1); cluster.handle(send); AMQFrame received = cluster.received.pop(); BOOST_CHECK_TYPEID_EQUAL(SessionOpenBody, *received.getBody()); @@ -59,7 +60,8 @@ BOOST_AUTO_TEST_CASE(testClusterTwo) { BOOST_REQUIRE(cluster.waitFor(2)); // Myself and child. // Exchange frames with child. - AMQFrame send(1, SessionOpenBody(VER)); + AMQFrame send(SessionOpenBody(VER)); + send.setChannel(1); cluster.handle(send); AMQFrame received = cluster.received.pop(); BOOST_CHECK_TYPEID_EQUAL(SessionOpenBody, *received.getBody()); @@ -89,8 +91,8 @@ struct CountHandler : public FrameHandler { /** Test the ClassifierHandler */ BOOST_AUTO_TEST_CASE(testClassifierHandlerWiring) { - AMQFrame queueDecl(0, QueueDeclareBody(VER)); - AMQFrame messageTrans(0, MessageTransferBody(VER)); + AMQFrame queueDecl(in_place<QueueDeclareBody>(VER)); + AMQFrame messageTrans(in_place<MessageTransferBody>(VER)); CountHandler wiring; CountHandler other; |