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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Mar 22 15:10:41 CDT 2012


branch "retry_deux" has been updated
       via  30866a79a0c267f42b5bb055362661c23c13d674 (commit)
       via  628f83bd58238ce2797f5732946a409ea4eae9ee (commit)
      from  994a7eb8876d5c83f2b6b9084da59e08175fc96e (commit)

Summary of changes:
 src/Operations/OperationContextCache.cpp |    2 +-
 test/UtilityTests.cpp                    |   32 +++--------------------------
 2 files changed, 5 insertions(+), 29 deletions(-)


- Log -----------------------------------------------------------------
commit 30866a79a0c267f42b5bb055362661c23c13d674
Author: David M. Lee <dlee at digium.com>
Date:   Thu Mar 22 15:08:02 2012 -0500

    Fixed addOperationContext.
    
    The logic for returning false if the cache had an existing entry was
    backwards, causing the function to fail if the cache _didn't_ already
    have an entry with a matching id.

diff --git a/src/Operations/OperationContextCache.cpp b/src/Operations/OperationContextCache.cpp
index 576d9c8..03c0f25 100644
--- a/src/Operations/OperationContextCache.cpp
+++ b/src/Operations/OperationContextCache.cpp
@@ -221,7 +221,7 @@ bool OperationContextCache::addOperationContext(const OperationContextPtr& opera
     boost::unique_lock<boost::shared_mutex> lock(mLock);
 
     OperationContextCacheEntryPtr existingEntry = get(operationContext);
-    if (!existingEntry)
+    if (existingEntry)
     {
         return false;
     }

commit 628f83bd58238ce2797f5732946a409ea4eae9ee
Author: David M. Lee <dlee at digium.com>
Date:   Thu Mar 22 15:06:50 2012 -0500

    Exit with results from unit_test_main.
    
    Without the exit(), all failures are ignored and the overall test
    passes.

diff --git a/test/UtilityTests.cpp b/test/UtilityTests.cpp
index f0e3d79..3c354e1 100644
--- a/test/UtilityTests.cpp
+++ b/test/UtilityTests.cpp
@@ -67,34 +67,10 @@ public:
         ProxyHelperTests::ProxyHelperTestSuite proxyHelperTests(mCommunicator);
         LocatorRegistrationTests::LocatorRegistrationTestSuite locatorWrapperTest(mCommunicator);
 
-        ::boost::unit_test::unit_test_main(&init, argc, argv);
-
-        IceBox::ServiceManagerPrx mgr; 
-        getProxy(mCommunicator, "IceBoxManager.Proxy", mgr);
-        if (mgr)
-        {
-            try
-            {
-                mgr->stopService(mName);
-                mgr->shutdown();
-            }
-            catch (...)
-            {
-            }
-        }
-
-        if (!getBooleanPropertyValueWithDefault(mCommunicator->getProperties(), "AsteriskSCF.Test.Continue", false))
-        {
-            try
-            {
-                mCommunicator->destroy();
-            }
-            catch (...)
-            {
-            }
-        }
+        int r = ::boost::unit_test::unit_test_main(&init, argc, argv);
+        exit(r);
     }
-    
+
     //
     // Tests for the ProxyHelper facilities.
     //
@@ -102,7 +78,7 @@ public:
     {
         return true;
     }
-    
+
 private:
     StringVectorAsArgs mArgs;
     Ice::CommunicatorPtr mCommunicator;

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


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



More information about the asterisk-scf-commits mailing list