[mapguide-commits] r4495 - trunk/MgDev/Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jan 7 18:47:33 EST 2010
Author: brucedechant
Date: 2010-01-07 18:47:33 -0500 (Thu, 07 Jan 2010)
New Revision: 4495
Modified:
trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
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: trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp 2010-01-07 23:46:12 UTC (rev 4494)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.cpp 2010-01-07 23:47:33 UTC (rev 4495)
@@ -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
Modified: trunk/MgDev/Server/src/UnitTesting/TestKmlService.h
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestKmlService.h 2010-01-07 23:46:12 UTC (rev 4494)
+++ trunk/MgDev/Server/src/UnitTesting/TestKmlService.h 2010-01-07 23:47:33 UTC (rev 4495)
@@ -25,9 +25,9 @@
CPPUNIT_TEST_SUITE(TestKmlService);
CPPUNIT_TEST(TestStart); // This must be the very first unit test
- //CPPUNIT_TEST(TestCase_GetMapKml);
- //CPPUNIT_TEST(TestCase_GetMapKmz);
- //CPPUNIT_TEST(TestCase_GetLayerKml);
+ CPPUNIT_TEST(TestCase_GetMapKml);
+ CPPUNIT_TEST(TestCase_GetMapKmz);
+ CPPUNIT_TEST(TestCase_GetLayerKml);
CPPUNIT_TEST(TestCase_GetFeaturesKml);
CPPUNIT_TEST(TestEnd); // This must be the very last unit test
More information about the mapguide-commits
mailing list