[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "route_replica" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 26 20:59:39 CDT 2011


branch "route_replica" has been updated
       via  4a6e2f00c7ca150c33c9beda1939aae8ac9505fa (commit)
      from  d2cd6936db895aa34e04cab9b573caef9f10e5eb (commit)

Summary of changes:
 config/routingtest-integ.config.in |   24 ++++++++++++------------
 test/TestRouting.cpp               |   35 +++++++++--------------------------
 2 files changed, 21 insertions(+), 38 deletions(-)


- Log -----------------------------------------------------------------
commit 4a6e2f00c7ca150c33c9beda1939aae8ac9505fa
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Apr 26 20:59:22 2011 -0500

    Some corrections to the test driver.

diff --git a/config/routingtest-integ.config.in b/config/routingtest-integ.config.in
index 1e9528c..c15d13d 100644
--- a/config/routingtest-integ.config.in
+++ b/config/routingtest-integ.config.in
@@ -15,8 +15,8 @@ IceBox.Service.RoutingService2=BasicRoutingService:create
 
 
 # Boost Test arguments can be passed here.
-#IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-IceBox.Service.RoutingTest = RoutingTest:create
+IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
+#IceBox.Service.RoutingTest = RoutingTest:create
 
 IceBox.Service.Replicator=BasicRoutingStateReplicator:create
 
@@ -39,16 +39,16 @@ BridgeManager.ServiceLocatorId=BridgeService
 
 RoutingService.Endpoints=tcp -p 10050
 RoutingService.ComponentService.Endpoints=tcp -p 10051
-RoutingService.ThreadPool.Size=6
-RoutingService.ThreadPool.SizeMax=10
+RoutingService.ThreadPool.Size=8
+RoutingService.ThreadPool.SizeMax=14
 RoutingService.ThreadPool.SizeWarn=9
 RoutingService.Standby=no
 RoutingService.StateReplicatorName=Replicator
 
 RoutingService2.Endpoints=tcp -p 10052
 RoutingService2.ComponentService.Endpoints=tcp -p 10053
-RoutingService2.ThreadPool.Size=6
-RoutingService2.ThreadPool.SizeMax=10
+RoutingService2.ThreadPool.Size=8
+RoutingService2.ThreadPool.SizeMax=14
 RoutingService2.ThreadPool.SizeWarn=9
 RoutingService2.Standby=yes
 RoutingService2.StateReplicatorName=Replicator
@@ -56,8 +56,8 @@ RoutingService2.StateReplicatorName=Replicator
 Replicator.InstanceName=Replicator
 Replicator.Endpoints=default -p 10054
 Replicator.ComponentService.Endpoints=default -p 10055
-Replicator.ThreadPool.Size=6
-Replicator.ThreadPool.SizeMax=10
+Replicator.ThreadPool.Size=8
+Replicator.ThreadPool.SizeMax=14
 Replicator.ThreadPool.SizeWarn=9
 
 # AsteriskSCF.RoutingService.logger=Debug
@@ -82,12 +82,12 @@ BackupSessionRouter.Proxy=SessionRouter:tcp -p 10052
 Replica.Proxy=BasicRoutingServiceReplica:tcp -p 10050
 BackupReplica.Proxy=BasicRoutingServiceReplica:tcp -p 10052
 
-TestRoutingAdapterIn.ThreadPool.Size=4
-TestRoutingAdapterIn.ThreadPool.SizeMax=10
+TestRoutingAdapterIn.ThreadPool.Size=8
+TestRoutingAdapterIn.ThreadPool.SizeMax=14
 TestRoutingAdapterIn.ThreadPool.SizeWarn=9
 
-TestRoutingAdapterOut.ThreadPool.Size=4
-TestRoutingAdapterOut.ThreadPool.SizeMax=10
+TestRoutingAdapterOut.ThreadPool.Size=8
+TestRoutingAdapterOut.ThreadPool.SizeMax=14
 TestRoutingAdapterOut.ThreadPool.SizeWarn=9
 
 ##########################################
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 4f4ec28..ef4b05c 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -218,9 +218,9 @@ public:
     {
         try
         {
-            SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", SharedTestData::instance.regExIds, SharedTestData::instance.endpointLocatorPrx);
-        
             PopulateEndpoints();
+
+            SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", SharedTestData::instance.regExIds, SharedTestData::instance.endpointLocatorPrx);
         }
         catch (...)
         {
@@ -257,6 +257,7 @@ public:
 
         // Initialize the regular expressions for the ids that this channel will support.
         // Use two strings just for kicks.
+        SharedTestData::instance.regExIds.clear();
         SharedTestData::instance.regExIds.push_back("101");
         SharedTestData::instance.regExIds.push_back("10[234]");  // 102, 103 or 104
     }
@@ -559,18 +560,11 @@ BOOST_FIXTURE_TEST_CASE(AttendedTransfer, PerTestFixture)
 /**
  * Test changing the locator ids for a registered endpoint locator.
  */
-BOOST_AUTO_TEST_CASE(ChangeLocatorIds)
+BOOST_FIXTURE_TEST_CASE(ChangeLocatorIds, PerTestFixture)
 {
-    try
-    {
-        SharedTestData::instance.locatorRegistry->addEndpointLocator("TestChannel", 
-                                                                     SharedTestData::instance.regExIds, 
-                                                                     SharedTestData::instance.endpointLocatorPrx);
-    }
-    catch (...)
-    {
-        BOOST_FAIL("Exception adding EndpointLocator.");
-    }
+
+    // The PerTestFixture will have added an endpoint locator with 4 destinations 
+    // of "101" thru "104"
 
     // Change the set of ids that our mock endpoint locator is supporting locally. 
     SharedTestData::instance.endpointLocator->clear();
@@ -579,16 +573,14 @@ BOOST_AUTO_TEST_CASE(ChangeLocatorIds)
     SharedTestData::instance.endpointLocator->addEndpoint("def");
 
     // Initialize the regular expressions for the ids that our mock channel will support.
+    SharedTestData::instance.regExIds.clear();
     SharedTestData::instance.regExIds.push_back("abc");
     SharedTestData::instance.regExIds.push_back("def");  
 
     // Tell the routing service we have different destination ids
     try
     {
-        std::vector<std::string> newvals;
-        newvals.push_back("abc");
-        newvals.push_back("def");
-        SharedTestData::instance.locatorRegistry->setEndpointLocatorDestinationIds("TestChannel", newvals);
+        SharedTestData::instance.locatorRegistry->setEndpointLocatorDestinationIds("TestChannel", SharedTestData::instance.regExIds);
     }
     catch (...)
     {
@@ -612,15 +604,6 @@ BOOST_AUTO_TEST_CASE(ChangeLocatorIds)
         BOOST_FAIL("Exception during lookup of modified EndpointLocator.");
     }
 
-    try
-    {
-        SharedTestData::instance.locatorRegistry->removeEndpointLocator("TestChannel");
-    }
-    catch (...)
-    {
-        BOOST_FAIL("Exception removing EndpointLocator.");
-    }
-
     BOOST_TEST_MESSAGE("Completed ChangeLocatorIds test.");
 }
 

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list