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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 26 13:35:51 CDT 2011


branch "master" has been updated
       via  74e92918e69c9851192aeb4139d762b23972cb9a (commit)
      from  57b2e61bdf648e629cb2964e34f74621c399a94b (commit)

Summary of changes:
 test/TestBridging.cpp |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 74e92918e69c9851192aeb4139d762b23972cb9a
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Apr 26 16:04:14 2011 -0230

    Fix a problem with the test suite were bridge manager listeners would
    not get registered because the were already subscribed. While the test suite
    is fixed, the code inside the service maybe should be tweaked to replace the
    existing subscription.

diff --git a/test/TestBridging.cpp b/test/TestBridging.cpp
index 41ee52c..5407259 100644
--- a/test/TestBridging.cpp
+++ b/test/TestBridging.cpp
@@ -21,6 +21,7 @@
 #include <boost/test/debug.hpp>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
 #include <AsteriskSCF/Media/MediaIf.h>
+#include <IceUtil/UUID.h>
 
 #include "BridgeManagerListenerI.h"
 #include "BridgeListenerI.h"
@@ -322,7 +323,7 @@ public:
                 testAdapter->activate();
                 BridgeManagerListenerIPtr servant = new BridgeManagerListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx listenerPrx;
-                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent("testBridgeManagerListener"));
+                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent(IceUtil::generateUUID()));
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerPrx mgrPrx = env()->primaryBridgeManager();
                 BOOST_CHECK(mgrPrx);
 
@@ -364,7 +365,7 @@ public:
                 testAdapter->activate();
                 BridgeManagerListenerIPtr servant = new BridgeManagerListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx listenerPrx;
-                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent("testBridgeManagerListener"));
+                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent(IceUtil::generateUUID()));
 
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerPrx mgrPrx = env()->primaryBridgeManager();
                 BOOST_CHECK(mgrPrx);
@@ -416,6 +417,7 @@ public:
                 bridge->shutdown();
 
                 BOOST_CHECK(servant->createCalls() == 1);
+                
                 channel.commands()->getlog(idA, log);
                 bool findStop = find(log, "stop");
                 if (!findStop)
@@ -460,7 +462,7 @@ public:
                 testAdapter->activate();
                 BridgeManagerListenerIPtr servant = new BridgeManagerListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx listenerPrx;
-                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent("testBridgeManagerListener"));
+                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent(IceUtil::generateUUID()));
 
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerPrx mgrPrx = env()->primaryBridgeManager();
                 BOOST_CHECK(mgrPrx);
@@ -471,11 +473,12 @@ public:
 
                 AsteriskSCF::BridgingTest::BridgeListenerPtr bridgeListener = new BridgeListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx bridgeListenerPrx;
-                addServant(bridgeListenerPrx, testAdapter, bridgeListener, testEnv.strToIdent("testBridgeListener"));
+                addServant(bridgeListenerPrx, testAdapter, bridgeListener, testEnv.strToIdent(IceUtil::generateUUID()));
                 mgrPrx->addDefaultBridgeListener(bridgeListenerPrx);
 
                 AsteriskSCF::SessionCommunications::V1::SessionSeq sessions;
                 AsteriskSCF::SessionCommunications::V1::BridgePrx bridge(mgrPrx->createBridge(sessions, 0));
+
                 TestChannelWrapper channel(env()->properties());
 
                 AsteriskSCF::SessionCommunications::V1::SessionPrx a = channel.getSession("311");
@@ -517,7 +520,7 @@ public:
                 channel.commands()->answer(idB);
                 BridgeSeq bridges = mgrPrx->listBridges();
                 BOOST_CHECK(bridges.size() == 1);
-                BOOST_CHECK(bridgeListener->addedCount() == 2);
+                BOOST_CHECK(bridgeListener->addedCount() == 2); 
                 bridge->shutdown();
 
                 BOOST_CHECK(servant->createCalls() == 1);
@@ -567,7 +570,7 @@ public:
                 testAdapter->activate();
                 BridgeManagerListenerIPtr servant = new BridgeManagerListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx listenerPrx;
-                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent("testBridgeManagerListener"));
+                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent(IceUtil::generateUUID()));
 
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerPrx mgrPrx = env()->primaryBridgeManager();
                 BOOST_CHECK(mgrPrx);
@@ -700,7 +703,7 @@ public:
                 testAdapter->activate();
                 BridgeManagerListenerIPtr servant = new BridgeManagerListenerI;
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerListenerPrx listenerPrx;
-                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent("testBridgeManagerListener"));
+                addServant(listenerPrx, testAdapter, servant, testEnv.strToIdent(IceUtil::generateUUID()));
 
                 AsteriskSCF::SessionCommunications::V1::BridgeManagerPrx mgrPrx = env()->primaryBridgeManager();
                 BOOST_CHECK(mgrPrx);

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


-- 
asterisk-scf/release/bridging.git



More information about the asterisk-scf-commits mailing list