[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "queue-shutdown" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 24 16:27:18 CDT 2011


branch "queue-shutdown" has been updated
       via  6deb16a94cc65923dfe812f839a153b8f38423ae (commit)
       via  42ebe7e6ec3a127ad6593cc40a8d07eba2e6d95c (commit)
      from  6da01131aef4cb6b009514adbd3acfefcbcfd5a7 (commit)

Summary of changes:
 .../AsteriskSCF/WorkQueue/SuspendableWorkQueue.h   |    2 +-
 include/AsteriskSCF/WorkQueue/WorkQueue.h          |    2 +-
 src/WorkQueue/SuspendableWorkQueue.cpp             |    2 +-
 src/WorkQueue/WorkQueue.cpp                        |    2 +-
 test/WorkQueue/TestSuspendableWorkQueue.cpp        |   42 ++++++++++----------
 test/WorkQueue/TestWorkQueue.cpp                   |   38 +++++++++---------
 6 files changed, 44 insertions(+), 44 deletions(-)


- Log -----------------------------------------------------------------
commit 6deb16a94cc65923dfe812f839a153b8f38423ae
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 16:21:08 2011 -0500

    Change from shutDown to shutdown.

diff --git a/include/AsteriskSCF/WorkQueue/SuspendableWorkQueue.h b/include/AsteriskSCF/WorkQueue/SuspendableWorkQueue.h
index 8c3ba09..1717ea1 100644
--- a/include/AsteriskSCF/WorkQueue/SuspendableWorkQueue.h
+++ b/include/AsteriskSCF/WorkQueue/SuspendableWorkQueue.h
@@ -41,7 +41,7 @@ public:
     bool executeWork();
     Ice::Long getSize();
     void setListener(const AsteriskSCF::System::WorkQueue::V1::QueueListenerPtr& listener);
-    void shutDown();
+    void shutdown();
 private:
     boost::shared_ptr<SuspendableWorkQueuePriv> mPriv;
 };
diff --git a/include/AsteriskSCF/WorkQueue/WorkQueue.h b/include/AsteriskSCF/WorkQueue/WorkQueue.h
index f7aee13..1357bd3 100644
--- a/include/AsteriskSCF/WorkQueue/WorkQueue.h
+++ b/include/AsteriskSCF/WorkQueue/WorkQueue.h
@@ -40,7 +40,7 @@ public:
     bool executeWork();
     Ice::Long getSize();
     void setListener(const AsteriskSCF::System::WorkQueue::V1::QueueListenerPtr& listener);
-    void shutDown();
+    void shutdown();
 private:
     boost::shared_ptr<WorkQueuePriv> mPriv;
 };
diff --git a/src/WorkQueue/SuspendableWorkQueue.cpp b/src/WorkQueue/SuspendableWorkQueue.cpp
index b5346d2..b4f53e1 100644
--- a/src/WorkQueue/SuspendableWorkQueue.cpp
+++ b/src/WorkQueue/SuspendableWorkQueue.cpp
@@ -384,7 +384,7 @@ void SuspendableWorkQueue::setListener(const QueueListenerPtr& listener)
     mPriv->mListener = listener;
 }
 
-void SuspendableWorkQueue::shutDown()
+void SuspendableWorkQueue::shutdown()
 {
     boost::unique_lock<boost::shared_mutex> lock(mPriv->mLock);
     mPriv->checkForShuttingDown();
diff --git a/src/WorkQueue/WorkQueue.cpp b/src/WorkQueue/WorkQueue.cpp
index fa50b5c..a4a9da0 100644
--- a/src/WorkQueue/WorkQueue.cpp
+++ b/src/WorkQueue/WorkQueue.cpp
@@ -185,7 +185,7 @@ void WorkQueue::setListener(const QueueListenerPtr& listener)
     mPriv->mListener = listener;
 }
 
-void WorkQueue::shutDown()
+void WorkQueue::shutdown()
 {
     boost::unique_lock<boost::shared_mutex> lock(mPriv->mLock);
     mPriv->checkForShuttingDown();
diff --git a/test/WorkQueue/TestSuspendableWorkQueue.cpp b/test/WorkQueue/TestSuspendableWorkQueue.cpp
index ab7f979..f469cfc 100644
--- a/test/WorkQueue/TestSuspendableWorkQueue.cpp
+++ b/test/WorkQueue/TestSuspendableWorkQueue.cpp
@@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE(addWork)
     BOOST_CHECK(listener->addedEmptyNotice == true);
     BOOST_CHECK(queue->getSize() == 1);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -213,17 +213,17 @@ BOOST_AUTO_TEST_CASE(addWorkSeq)
     BOOST_CHECK(listener->emptyNotice == false);
     BOOST_CHECK(queue->getSize() == 2);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
 
-BOOST_AUTO_TEST_CASE(shutDownException)
+BOOST_AUTO_TEST_CASE(shutdownException)
 {
     TestListenerPtr listener(new TestListener);
     SuspendableQueuePtr queue(new SuspendableWorkQueue(listener));
 
-    queue->shutDown();
+    queue->shutdown();
 
     bool excepted;
     try
@@ -284,7 +284,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
 
     try
     {
-        queue->shutDown();
+        queue->shutdown();
     }
     catch (const ShuttingDown&)
     {
@@ -311,7 +311,7 @@ BOOST_AUTO_TEST_CASE(appendWork)
     BOOST_CHECK(listener->emptyNotice == false);
     BOOST_CHECK(queue->getSize() == 2);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -338,7 +338,7 @@ BOOST_AUTO_TEST_CASE(cancelWork)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -365,7 +365,7 @@ BOOST_AUTO_TEST_CASE(cancelNonExistent1)
     BOOST_CHECK(listener->emptyNotice == false);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE(cancelNonExistent2)
     BOOST_CHECK(excepted == false);
     BOOST_CHECK(queue->getSize() == 1);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -411,7 +411,7 @@ BOOST_AUTO_TEST_CASE(simpleWorkExecution)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -427,7 +427,7 @@ BOOST_AUTO_TEST_CASE(executeNonExistent)
     BOOST_CHECK(queue->getSize() == 0);
     BOOST_CHECK(listener->emptyNotice == false);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -455,7 +455,7 @@ BOOST_AUTO_TEST_CASE(executionOrder1)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -507,7 +507,7 @@ BOOST_AUTO_TEST_CASE(executionOrder2)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -581,7 +581,7 @@ BOOST_AUTO_TEST_CASE(complexWork)
     BOOST_CHECK(work->currentState == ComplexTask::Task2Complete);
     BOOST_CHECK(listener->emptyNotice == true);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -612,7 +612,7 @@ BOOST_AUTO_TEST_CASE(racyWork)
     BOOST_CHECK(queue->getSize() == 0);
     BOOST_CHECK(listener->emptyNotice == true);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
diff --git a/test/WorkQueue/TestWorkQueue.cpp b/test/WorkQueue/TestWorkQueue.cpp
index 97ea1ad..50a0f9b 100644
--- a/test/WorkQueue/TestWorkQueue.cpp
+++ b/test/WorkQueue/TestWorkQueue.cpp
@@ -112,17 +112,17 @@ BOOST_AUTO_TEST_CASE(addWork)
     BOOST_CHECK(listener->tasksAdded == 1);
     BOOST_CHECK(queue->getSize() == 1);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
 
-BOOST_AUTO_TEST_CASE(shutDownException)
+BOOST_AUTO_TEST_CASE(shutdownException)
 {
     TestListenerPtr listener(new TestListener);
     QueuePtr queue(new WorkQueue(listener));
 
-    queue->shutDown();
+    queue->shutdown();
 
     bool excepted;
     try
@@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
 
     try
     {
-        queue->shutDown();
+        queue->shutdown();
     }
     catch (const ShuttingDown&)
     {
@@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(addWorkSeq)
     BOOST_CHECK(listener->tasksAdded == 2);
     BOOST_CHECK(queue->getSize() == 2);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE(appendWork)
     BOOST_CHECK(listener->tasksAdded == 1);
     BOOST_CHECK(queue->getSize() == 2);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -251,7 +251,7 @@ BOOST_AUTO_TEST_CASE(cancelWork)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(cancelNonExistent1)
     BOOST_CHECK(listener->emptyNotice == false);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -287,7 +287,7 @@ BOOST_AUTO_TEST_CASE(cancelNonExistent2)
 
     BOOST_CHECK(queue->getSize() == 1);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -306,7 +306,7 @@ BOOST_AUTO_TEST_CASE(workExecution)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -322,7 +322,7 @@ BOOST_AUTO_TEST_CASE(executeNonExistent)
     BOOST_CHECK(queue->getSize() == 0);
     BOOST_CHECK(listener->emptyNotice == false);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -350,7 +350,7 @@ BOOST_AUTO_TEST_CASE(executionOrder1)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }
@@ -402,7 +402,7 @@ BOOST_AUTO_TEST_CASE(executionOrder2)
     BOOST_CHECK(listener->emptyNotice == true);
     BOOST_CHECK(queue->getSize() == 0);
 
-    queue->shutDown();
+    queue->shutdown();
 
     BOOST_CHECK(listener->shutdownNotice == true);
 }

commit 42ebe7e6ec3a127ad6593cc40a8d07eba2e6d95c
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 16:14:07 2011 -0500

    Catch ShuttingDown exceptions by const reference.
    
    Suggested in CR-ASTSCF-98

diff --git a/test/WorkQueue/TestSuspendableWorkQueue.cpp b/test/WorkQueue/TestSuspendableWorkQueue.cpp
index 5cf376c..ab7f979 100644
--- a/test/WorkQueue/TestSuspendableWorkQueue.cpp
+++ b/test/WorkQueue/TestSuspendableWorkQueue.cpp
@@ -230,7 +230,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->getSize();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -242,7 +242,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->enqueueWork(work);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -253,7 +253,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->executeWork();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -264,7 +264,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->cancelWork(work);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->setListener(listener);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->shutDown();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
diff --git a/test/WorkQueue/TestWorkQueue.cpp b/test/WorkQueue/TestWorkQueue.cpp
index 79f357d..97ea1ad 100644
--- a/test/WorkQueue/TestWorkQueue.cpp
+++ b/test/WorkQueue/TestWorkQueue.cpp
@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->getSize();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->enqueueWork(work);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->executeWork();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->cancelWork(work);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->setListener(listener);
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }
@@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE(shutDownException)
     {
         queue->shutDown();
     }
-    catch (ShuttingDown)
+    catch (const ShuttingDown&)
     {
         excepted = true;
     }

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list