qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r674825 - /incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp
Date Tue, 08 Jul 2008 13:54:03 GMT
Author: aconway
Date: Tue Jul  8 06:54:03 2008
New Revision: 674825

URL: http://svn.apache.org/viewvc?rev=674825&view=rev
Log:
Fix leak in XmlClientSessionTests - was leaking a Session.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp?rev=674825&r1=674824&r2=674825&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp Tue Jul  8 06:54:03 2008
@@ -121,18 +121,17 @@
 QPID_AUTO_TEST_CASE(testXmlBinding) {
   ClientSessionFixture f;
 
-  Session session = f.connection.newSession();
-  SubscriptionManager subscriptions(session);
+  SubscriptionManager subscriptions(f.session);
   SubscribedLocalQueue localQueue(subscriptions);
 
-  session.exchangeDeclare(qpid::client::arg::exchange="xml", qpid::client::arg::type="xml");
-  session.queueDeclare(qpid::client::arg::queue="odd_blue");
+  f.session.exchangeDeclare(qpid::client::arg::exchange="xml", qpid::client::arg::type="xml");
+  f.session.queueDeclare(qpid::client::arg::queue="odd_blue");
   subscriptions.subscribe(localQueue, "odd_blue");
 
   FieldTable binding;
   binding.setString("xquery", "declare variable $color external;"
                                "(./message/id mod 2 = 1) and ($color = 'blue')");
-  session.exchangeBind(qpid::client::arg::exchange="xml", qpid::client::arg::queue="odd_blue",
qpid::client::arg::bindingKey="query_name", qpid::client::arg::arguments=binding); 
+  f.session.exchangeBind(qpid::client::arg::exchange="xml", qpid::client::arg::queue="odd_blue",
qpid::client::arg::bindingKey="query_name", qpid::client::arg::arguments=binding); 
 
   Message message;
   message.getDeliveryProperties().setRoutingKey("query_name"); 
@@ -141,7 +140,7 @@
   string m = "<message><id>1</id></message>";
   message.setData(m);
 
-  session.messageTransfer(qpid::client::arg::content=message,  qpid::client::arg::destination="xml");
+  f.session.messageTransfer(qpid::client::arg::content=message,  qpid::client::arg::destination="xml");
 
   Message m2 = localQueue.get();
   BOOST_CHECK_EQUAL(m, m2.getData());  



Mime
View raw message