[asterisk-scf-commits] asterisk-scf/integration/servicediscovery.git branch "publish-internals" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Nov 14 10:38:07 CST 2011
branch "publish-internals" has been updated
via c72f2a9970dea78977f40adcdc2fa125159f0c63 (commit)
from 45aeff5705396413ea67a839b5f11c1e51f418df (commit)
Summary of changes:
src/ServiceLocator.cpp | 2 +-
test/TestServiceLocator.cpp | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit c72f2a9970dea78977f40adcdc2fa125159f0c63
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Nov 14 12:39:00 2011 -0400
Use the defined facet for the management interface and also add a test for checking it exists.
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index 22018fa..aba1714 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -287,7 +287,7 @@ void ServiceLocatorApp::start(const string& appName, const Ice::CommunicatorPtr&
mDiscoveryAdapter->add(locatorService, communicator->stringToIdentity("LocatorService"));
- mDiscoveryAdapter->addFacet(locatorServiceManagement, communicator->stringToIdentity("LocatorService"), "manage");
+ mDiscoveryAdapter->addFacet(locatorServiceManagement, communicator->stringToIdentity("LocatorService"), ServiceLocatorManagementFacet);
// Make our IceStorm topic manager available to all if we are the active service. This is because by adding it
// we will replicate it.
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index b7acb5a..710ec88 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -249,6 +249,30 @@ BOOST_AUTO_TEST_CASE(FindBuiltinIceStorm)
}
/**
+ * Confirm that the management interface is available.
+ */
+BOOST_AUTO_TEST_CASE(GetManagementFacet)
+{
+ bool retrieved = false;
+
+ try
+ {
+ ServiceLocatorManagementPrx management = ServiceLocatorManagementPrx::checkedCast(testbed.discovery, ServiceLocatorManagementFacet);
+ retrieved = true;
+ }
+ catch (const Ice::Exception &e)
+ {
+ BOOST_TEST_MESSAGE(e.ice_name());
+ BOOST_TEST_MESSAGE(e.what());
+ }
+ catch (...)
+ {
+ }
+
+ BOOST_CHECK(retrieved);
+}
+
+/**
* Confirm that we find no service using locate before we have added one.
*/
BOOST_AUTO_TEST_CASE(ServiceNotFoundBeforeAdd)
-----------------------------------------------------------------------
--
asterisk-scf/integration/servicediscovery.git
More information about the asterisk-scf-commits
mailing list