[mapguide-commits] r4488 - sandbox/adsk/2.2gp/Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jan 7 12:40:27 EST 2010
Author: brucedechant
Date: 2010-01-07 12:40:26 -0500 (Thu, 07 Jan 2010)
New Revision: 4488
Modified:
sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.cpp
sandbox/adsk/2.2gp/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: sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.cpp
===================================================================
--- sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.cpp 2010-01-07 17:37:04 UTC (rev 4487)
+++ sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.cpp 2010-01-07 17:40:26 UTC (rev 4488)
@@ -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: sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.h
===================================================================
--- sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.h 2010-01-07 17:37:04 UTC (rev 4487)
+++ sandbox/adsk/2.2gp/Server/src/UnitTesting/TestKmlService.h 2010-01-07 17:40:26 UTC (rev 4488)
@@ -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