summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/Cluster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-07-27 19:27:43 +0000
committerAlan Conway <aconway@apache.org>2007-07-27 19:27:43 +0000
commit143dea5082101ca00b058959da7b83f0f078a68b (patch)
tree885dfac08dc42cc8e424fda2a1078a50ffd12994 /qpid/cpp/src/tests/Cluster.cpp
parent008544afce4d981650212d01db21d8a94f18e562 (diff)
downloadqpid-python-143dea5082101ca00b058959da7b83f0f078a68b.tar.gz
Drop SessionFrame, UUID is not required and more efficient to transmit plain
AMQFrames. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@560356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/Cluster.cpp')
-rw-r--r--qpid/cpp/src/tests/Cluster.cpp30
1 files changed, 10 insertions, 20 deletions
diff --git a/qpid/cpp/src/tests/Cluster.cpp b/qpid/cpp/src/tests/Cluster.cpp
index 5ace48b736..811fc0133e 100644
--- a/qpid/cpp/src/tests/Cluster.cpp
+++ b/qpid/cpp/src/tests/Cluster.cpp
@@ -33,17 +33,11 @@ static const ProtocolVersion VER;
/** Verify membership in a cluster with one member. */
BOOST_AUTO_TEST_CASE(testClusterOne) {
TestCluster cluster("clusterOne", "amqp:one:1");
- AMQFrame frame(VER, 1, new SessionPingBody(VER));
- Uuid id(true);
- SessionFrame send(id, frame, true);
+ AMQFrame send(VER, 1, new SessionPingBody(VER));
cluster.handle(send);
- SessionFrame sf;
- BOOST_REQUIRE(cluster.received.waitPop(sf));
-
- BOOST_CHECK(sf.isIncoming);
- BOOST_CHECK_EQUAL(id, sf.uuid);
- BOOST_CHECK_TYPEID_EQUAL(SessionPingBody, *sf.frame.getBody());
-
+ AMQFrame received;
+ BOOST_REQUIRE(cluster.received.waitPop(received));
+ BOOST_CHECK_TYPEID_EQUAL(SessionPingBody, *received.getBody());
BOOST_CHECK_EQUAL(1u, cluster.size());
Cluster::MemberList members = cluster.getMembers();
BOOST_CHECK_EQUAL(1u, members.size());
@@ -65,18 +59,14 @@ BOOST_AUTO_TEST_CASE(testClusterTwo) {
BOOST_REQUIRE(cluster.waitFor(2)); // Myself and child.
// Exchange frames with child.
- AMQFrame frame(VER, 1, new SessionPingBody(VER));
- Uuid id(true);
- SessionFrame send(id, frame, true);
+ AMQFrame send(VER, 1, new SessionPingBody(VER));
cluster.handle(send);
- SessionFrame sf;
- BOOST_REQUIRE(cluster.received.waitPop(sf));
- BOOST_CHECK_EQUAL(id, sf.uuid);
- BOOST_CHECK(sf.isIncoming);
- BOOST_CHECK_TYPEID_EQUAL(SessionPingBody, *sf.frame.getBody());
+ AMQFrame received;
+ BOOST_REQUIRE(cluster.received.waitPop(received));
+ BOOST_CHECK_TYPEID_EQUAL(SessionPingBody, *received.getBody());
- BOOST_REQUIRE(cluster.received.waitPop(sf));
- BOOST_CHECK_TYPEID_EQUAL(SessionPongBody, *sf.frame.getBody());
+ BOOST_REQUIRE(cluster.received.waitPop(received));
+ BOOST_CHECK_TYPEID_EQUAL(SessionPongBody, *received.getBody());
if (!nofork) {
// Wait for child to exit.