You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/10/27 16:05:19 UTC

svn commit: r708210 - in /incubator/qpid/trunk/qpid/cpp/src: qpid/client/SubscriptionManager.cpp qpid/client/SubscriptionManager.h tests/Makefile.am

Author: aconway
Date: Mon Oct 27 08:05:19 2008
New Revision: 708210

URL: http://svn.apache.org/viewvc?rev=708210&view=rev
Log:
client::SubscriptionManager::findSubscription() throws if not found.
Added progress indicator to boost tests.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h
    incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp?rev=708210&r1=708209&r2=708210&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.cpp Mon Oct 27 08:05:19 2008
@@ -110,8 +110,10 @@
 Session SubscriptionManager::getSession() const { return session; }
 
 Subscription SubscriptionManager::getSubscription(const std::string& name) const {
-    
-    return (*subscriptions.find(name)).second;
+    std::map<std::string, Subscription>::const_iterator i = subscriptions.find(name);
+    if (i == subscriptions.end())
+        throw Exception(QPID_MSG("Subscription not found: " << name));
+    return i->second;
 }
 
 void SubscriptionManager::registerFailoverHandler (boost::function<void ()> fh) {

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h?rev=708210&r1=708209&r2=708210&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/SubscriptionManager.h Mon Oct 27 08:05:19 2008
@@ -126,8 +126,8 @@
      */
     bool get(Message& result, const std::string& queue, sys::Duration timeout=0);
 
-    /** Get a subscription by name, returns a null Subscription handle
-     * if not found.
+    /** Get a subscription by name.
+     *@throw Exception if not found.
      */
     Subscription getSubscription(const std::string& name) const;
     

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am?rev=708210&r1=708209&r2=708210&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/Makefile.am Mon Oct 27 08:05:19 2008
@@ -132,7 +132,7 @@
 header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h
 header_test_LDADD=$(lib_client) 
 
-TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) QPID_DATA_DIR= $(srcdir)/run_test 
+TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) QPID_DATA_DIR= BOOST_TEST_SHOW_PROGRESS=yes $(srcdir)/run_test 
 
 system_tests = client_test quick_perftest quick_topictest run_header_test
 TESTS += start_broker $(system_tests) python_tests stop_broker run_federation_tests run_acl_tests