From eb7f88e2818ddb98bc02ff7fc39c936d421d16d8 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 2 Jul 2007 22:35:33 +0000 Subject: 2007-06-30 * src/qpid/cluster/Cluster.cpp: Refactor - expose 4 handler points for all traffic to/from cluster. Removed HandlerUpdater functionality, separate class. Cluster only deals with membership and connecting the 4 handler points to CPG multicast. * src/tests/cluster.mk: Dropped newgrp ais wrapper scripts, its much simpler if the user just does "newgrp ais" before building. * src/tests/ais_check: Test script to check if users gid is ais and give clear notice if not. * src/tests/Cluster.cpp: Updated for changes to Cluster. * src/qpid/cluster/Cpg.cpp: Better messages for common errors. * Handler.h: Remove nextHandler() minor convenience is outweighted by risk of undetected errors if handlers that expect next() to be set are called when it's not set. * src/qpid/cluster/Cpg.cpp: Added logging. Replaced boost::function with traditional virtual interface (nasty stack traces.) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@552614 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/Cpg.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'qpid/cpp/src/tests/Cpg.cpp') diff --git a/qpid/cpp/src/tests/Cpg.cpp b/qpid/cpp/src/tests/Cpg.cpp index 97b829ea63..ec98ca4fc2 100644 --- a/qpid/cpp/src/tests/Cpg.cpp +++ b/qpid/cpp/src/tests/Cpg.cpp @@ -47,11 +47,11 @@ ostream& operator<<(ostream& o, const pair& array) { o << "{ "; ostream_iterator i(o, " "); copy(array.first, array.first+array.second, i); - cout << "}"; + o << "}"; return o; } -struct Callback { +struct Callback : public Cpg::Handler { Callback(const string group_) : group(group_) {} string group; vector delivered; @@ -88,10 +88,7 @@ BOOST_AUTO_TEST_CASE(Cpg_basic) { // Cpg::Name group("foo"); Callback cb(group.str()); - Cpg::DeliverFn deliver=boost::bind(&Callback::deliver, &cb, _1, _2, _3, _4, _5, _6); - Cpg::ConfigChangeFn reconfig=boost::bind(&Callback::configChange, &cb, _1, _2, _3, _4, _5, _6, _7, _8); - - Cpg cpg(deliver, reconfig); + Cpg cpg(cb); cpg.join(group); iovec iov = { (void*)"Hello!", 6 }; cpg.mcast(group, &iov, 1); -- cgit v1.2.1