From b7c528b027bff7585481c9ce3a01144040c6de5a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 24 Jul 2007 19:39:27 +0000 Subject: * Summary: - Wiring (declare/delete/bind) is replicated via AIS. - TestOptions includes all logging options. - Logger automatically parses env vars so logging can be enabled for any program linked with libqpidcommon e.g. by setting QPID_TRACE=1. * src/qpid/cluster/SessionManager.cpp: Handle frames from cluster - Forward to BrokerAdapter for execution. - Suppress responses in proxy. * src/tests/TestOptions.h (Options): Logging options, --help option. * src/qpid/client/ClientConnection.cpp: Removed log initialization. Logs are initialized either in TestOptions or automatically from env vars, e.g. QPID_TRACE, * src/qpid/QpidError.h (class QpidError): Initialize Exception in constructor so messages can be logged. * src/qpid/framing/ChannelAdapter.h: Made send() virtual. * src/tests/Cluster_child.cpp: UUID corrected. * src/qpid/broker/Broker.cpp: Pass chains to updater by ref. * src/qpid/Options.cpp (parse): Fix log settings from environment. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@559171 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/cluster_client.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'cpp/src/tests/cluster_client.cpp') diff --git a/cpp/src/tests/cluster_client.cpp b/cpp/src/tests/cluster_client.cpp index 421a33a40a..7620faa9fa 100644 --- a/cpp/src/tests/cluster_client.cpp +++ b/cpp/src/tests/cluster_client.cpp @@ -52,6 +52,7 @@ struct ClusterConnections : public vector > { }; BOOST_AUTO_TEST_CASE(testWiringReplication) { + // Declare on one broker, use on others. ClusterConnections cluster; BOOST_REQUIRE(cluster.size() > 1); @@ -63,13 +64,17 @@ BOOST_AUTO_TEST_CASE(testWiringReplication) { broker0.declareExchange(fooEx); broker0.declareQueue(fooQ); broker0.bind(fooEx, fooQ, "FooKey"); - - Channel broker1; - cluster[1]->openChannel(broker1); - broker1.publish(Message("hello"), fooEx, "FooKey"); - Message m; - BOOST_REQUIRE(broker1.get(m, fooQ)); - BOOST_REQUIRE_EQUAL(m.getData(), "hello"); + broker0.close(); + + for (size_t i = 1; i < cluster.size(); ++i) { + Channel ch; + cluster[i]->openChannel(ch); + ch.publish(Message("hello"), fooEx, "FooKey"); + Message m; + BOOST_REQUIRE(ch.get(m, fooQ)); + BOOST_REQUIRE_EQUAL(m.getData(), "hello"); + ch.close(); + } } -- cgit v1.2.1