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.
+     [EMAIL PROTECTED] 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


Reply via email to