[mapguide-commits] r4497 - sandbox/adsk/2.1/Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Jan 8 15:09:50 EST 2010


Author: brucedechant
Date: 2010-01-08 15:09:45 -0500 (Fri, 08 Jan 2010)
New Revision: 4497

Modified:
   sandbox/adsk/2.1/Server/src/UnitTesting/TestKmlService.cpp
Log:
Fix for trac ticket 1131 - Load balancing doesn't support fail over
http://trac.osgeo.org/mapguide/ticket/1131

Notes:
- Fix failed KML unit tests



Modified: sandbox/adsk/2.1/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/UnitTesting/TestKmlService.cpp	2010-01-08 05:00:03 UTC (rev 4496)
+++ sandbox/adsk/2.1/Server/src/UnitTesting/TestKmlService.cpp	2010-01-08 20:09:45 UTC (rev 4497)
@@ -245,6 +245,12 @@
         {
             SAFE_RELEASE(e);
             ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestCase_GetMapKml skipped because unable to connect to test server.\n")));
+
+            // We need to update the mapguide server status so that it can be used again because we have used the 
+            // same exception class for servers outside the one actually executing this code.
+            MgSiteManager* siteManager = MgSiteManager::GetInstance();
+            Ptr<MgSiteInfo> siteInfo = siteManager->GetSiteInfo(0);
+            siteInfo->SetStatus(MgSiteInfo::Ok);
         }
 
         //compare results against referenced content
@@ -290,6 +296,12 @@
         {
             SAFE_RELEASE(e);
             ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestCase_GetMapKmz skipped because unable to connect to test server.\n")));
+
+            // We need to update the mapguide server status so that it can be used again because we have used the 
+            // same exception class for servers outside the one actually executing this code.
+            MgSiteManager* siteManager = MgSiteManager::GetInstance();
+            Ptr<MgSiteInfo> siteInfo = siteManager->GetSiteInfo(0);
+            siteInfo->SetStatus(MgSiteInfo::Ok);
         }
     }
     catch(MgException* e)
@@ -334,6 +346,12 @@
         {
             SAFE_RELEASE(e);
             ACE_DEBUG((LM_INFO, ACE_TEXT("\nTestCase_GetLayerKml skipped because unable to connect to test server.\n")));
+
+            // We need to update the mapguide server status so that it can be used again because we have used the 
+            // same exception class for servers outside the one actually executing this code.
+            MgSiteManager* siteManager = MgSiteManager::GetInstance();
+            Ptr<MgSiteInfo> siteInfo = siteManager->GetSiteInfo(0);
+            siteInfo->SetStatus(MgSiteInfo::Ok);
         }
 
         //compare results against referenced content



More information about the mapguide-commits mailing list