[asterisk-scf-commits] asterisk-scf/release/servicediscovery.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Dec 6 14:59:23 CST 2011


branch "master" has been updated
       via  e2ae2ad8314bf9fbc10c8b27f6fdc9e068ee6c78 (commit)
      from  9f904f9821b2ba067f532272bd3140c75abd22cf (commit)

Summary of changes:
 config/test_component.conf      |   19 +++++++++----------
 test/TestComparatorBlocking.cpp |    6 +++---
 test/TestServiceLocator.cpp     |    6 +++---
 3 files changed, 15 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit e2ae2ad8314bf9fbc10c8b27f6fdc9e068ee6c78
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Dec 6 17:29:03 2011 -0330

    Modify all unit tests to use loopback adapter.

diff --git a/config/test_component.conf b/config/test_component.conf
index 18866fe..24a5805 100644
--- a/config/test_component.conf
+++ b/config/test_component.conf
@@ -23,25 +23,25 @@ IceBox.LoadOrder=ServiceDiscoveryStateReplicator,ServiceDiscovery,ServiceDiscove
 IceBox.Service.ServiceDiscovery=service_locator:create
 
 # Test endpoints for the service locator local adapter
-ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -p 4410
+ServiceDiscovery.BackplaneAdapter.Endpoints=tcp -h 127.0.0.1 -p 4410
 
 # Test endpoints for the service locator discovery adapter
-ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -p 4411
+ServiceDiscovery.Locator.ServiceAdapter.Endpoints=tcp -h 127.0.0.1  -p 4411
 
 # Test endpoints for the service locator management adapter
-ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -p 4412
+ServiceDiscovery.Management.ServiceAdapter.Endpoints=tcp -h 127.0.0.1  -p 4412
 
 # Name for the IceStorm instance
 ServiceDiscovery.IceStorm.InstanceName=ServiceDiscovery
 
 # Proxy to the state replicator
-ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -p 4413
+ServiceDiscovery.StateReplicator.Proxy=ServiceLocatorStateReplicatorService:tcp -h 127.0.0.1  -p 4413
 
 # Configure ourselves as a master
 ServiceDiscovery.Standalone=no
 
-ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -p 4421
-ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -p 4422:udp -p 4422
+ServiceDiscovery.IceStorm.TopicManager.Endpoints=default -h 127.0.0.1  -p 4421
+ServiceDiscovery.IceStorm.Publish.Endpoints=tcp -h 127.0.0.1  -p 4422:udp -h 127.0.0.1  -p 4422
 ServiceDiscovery.IceStorm.Trace.TopicManager=2
 ServiceDiscovery.IceStorm.Transient=1
 ServiceDiscovery.IceStorm.Flush.Timeout=2000
@@ -52,11 +52,10 @@ ServiceDiscovery.IceStorm.Flush.Timeout=2000
 IceBox.Service.ServiceDiscoveryStateReplicator=ServiceLocatorStateReplicator:create
 
 # Test endpoints for the state replicator
-ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -p 4413:udp -p 4413
+ServiceDiscoveryStateReplicator.Adapter.Endpoints=tcp -h 127.0.0.1  -p 4413:udp -h 127.0.0.1  -p 4413
 
 # test configuration
 IceBox.Service.ServiceDiscoveryTest=service_locator_test:create
 
-LocatorService.Proxy=LocatorService:tcp -p 4411
-LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4412
-
+LocatorService.Proxy=LocatorService:tcp -h 127.0.0.1  -p 4411
+LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -h 127.0.0.1  -p 4412
diff --git a/test/TestComparatorBlocking.cpp b/test/TestComparatorBlocking.cpp
index 8827fc2..7272313 100644
--- a/test/TestComparatorBlocking.cpp
+++ b/test/TestComparatorBlocking.cpp
@@ -137,7 +137,7 @@ public:
         blocker(new BlockingComparator()),
         blockerAdapter(
             blockerCommunicator->createObjectAdapterWithEndpoints(
-                "blocker", "default")),
+                "blocker", "default -h 127.0.0.1")),
         blockerProxy(
             ServiceLocatorParamsComparePrx::checkedCast(
                 blockerAdapter->addWithUUID(blocker))),
@@ -145,10 +145,10 @@ public:
         discoveryCommunicator(Ice::initialize()),
         management(ServiceLocatorManagementPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
-                    "LocatorServiceManagement:tcp -p 4412"))),
+                    "LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412"))),
         discovery(ServiceLocatorPrx::checkedCast(
                 discoveryCommunicator->stringToProxy(
-                    "LocatorService:tcp -p 4411"))),
+                    "LocatorService:tcp -h 127.0.0.1 -p 4411"))),
         proxy(management->addService(management, "self")),
         params(new ServiceLocatorParams())
     {
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 595b1a2..c39619d 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -176,7 +176,7 @@ struct GlobalIceFixture
         {
             testbed.communicatorIncoming = Ice::initialize(mCachedArgs.argc, mCachedArgs.argv);
 
-            testbed.adapter = testbed.communicatorIncoming->createObjectAdapterWithEndpoints("CompareServiceAdapter", "default");
+            testbed.adapter = testbed.communicatorIncoming->createObjectAdapterWithEndpoints("CompareServiceAdapter", "default -h 127.0.0.1");
 
             ServiceLocatorParamsComparePtr CompareService = new TestCompareServiceImpl();
 
@@ -188,14 +188,14 @@ struct GlobalIceFixture
 
             // TODO: This should use a configuration file most likely instead of hardcoding
 
-            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -p 4412"));
+            testbed.management = ServiceLocatorManagementPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorServiceManagement:tcp -h 127.0.0.1 -p 4412"));
 
             if (!testbed.management)
             {
                 throw "Invalid service discovery management proxy";
             }
 
-            testbed.discovery = ServiceLocatorPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorService:tcp -p 4411"));
+            testbed.discovery = ServiceLocatorPrx::checkedCast(testbed.communicatorOutgoing->stringToProxy("LocatorService:tcp -h 127.0.0.1 -p 4411"));
 
             if (!testbed.discovery)
             {

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


-- 
asterisk-scf/release/servicediscovery.git



More information about the asterisk-scf-commits mailing list