[mapguide-commits] r5407 - trunk/MgDev/Server/src/UnitTesting

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Nov 26 13:46:30 EST 2010


Author: brucedechant
Date: 2010-11-26 10:46:30 -0800 (Fri, 26 Nov 2010)
New Revision: 5407

Modified:
   trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
   trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
Log:
Update server unit tests.

- Used more specific names for thread data structures


Modified: trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2010-11-25 05:37:22 UTC (rev 5406)
+++ trunk/MgDev/Server/src/UnitTesting/TestResourceService.cpp	2010-11-26 18:46:30 UTC (rev 5407)
@@ -1644,7 +1644,7 @@
 }
 
 // data structure which is passed to each thread
-struct ThreadData
+struct ResourceThreadData
 {
     INT32 threadId;
     INT32 command;
@@ -1656,7 +1656,7 @@
 ACE_THR_FUNC_RETURN RepositoryWorker(void* param)
 {
     // get the data for this thread
-    ThreadData* threadData = (ThreadData*)param;
+    ResourceThreadData* threadData = (ResourceThreadData*)param;
     INT32 threadId = threadData->threadId;
     INT32 command = threadData->command;
     ACE_DEBUG((LM_INFO, ACE_TEXT("> thread %d started\n"), threadId));
@@ -1704,7 +1704,7 @@
         message += L"\n";
         message += e->GetStackTrace(TEST_LOCALE);
         SAFE_RELEASE(e);
-        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker - Exception:\n%W\n"), message.c_str()));
+        ACE_DEBUG((LM_INFO, ACE_TEXT("RepositoryWorker(%d) - Exception:\n%W\n"), threadId, message.c_str()));
     }
     catch (...)
     {
@@ -1724,7 +1724,7 @@
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
-    ThreadData threadData[numThreads];
+    ResourceThreadData threadData[numThreads];
 
     try
     {

Modified: trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2010-11-25 05:37:22 UTC (rev 5406)
+++ trunk/MgDev/Server/src/UnitTesting/TestTileService.cpp	2010-11-26 18:46:30 UTC (rev 5407)
@@ -243,7 +243,7 @@
 
 
 // data structure which is passed to each thread
-struct ThreadData
+struct TileThreadData
 {
     INT32 threadId;
     bool done;
@@ -263,7 +263,7 @@
 ACE_THR_FUNC_RETURN GetTileWorker(void* param)
 {
     // get the data for this thread
-    ThreadData* threadData = (ThreadData*)param;
+    TileThreadData* threadData = (TileThreadData*)param;
     INT32 threadId = threadData->threadId;
     INT32 tileRow  = threadData->tileRow;
     INT32 tileCol  = threadData->tileCol;
@@ -324,7 +324,7 @@
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
-    ThreadData threadData[numThreads];
+    TileThreadData threadData[numThreads];
 
     // define the range of tiles to get
     INT32 tileRowMin =  0;
@@ -461,7 +461,7 @@
 ACE_THR_FUNC_RETURN SetTileWorker(void* param)
 {
     // get the data for this thread
-    ThreadData* threadData = (ThreadData*)param;
+    TileThreadData* threadData = (TileThreadData*)param;
     INT32 threadId = threadData->threadId;
     INT32 tileRow  = threadData->tileRow;
     INT32 tileCol  = threadData->tileCol;
@@ -528,7 +528,7 @@
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
-    ThreadData threadData[numThreads];
+    TileThreadData threadData[numThreads];
 
     // define the range of tiles to set
     INT32 tileRowMin =  0;
@@ -719,7 +719,7 @@
 {
     // specify the number of threads to use
     const INT32 numThreads = MG_TEST_THREADS;
-    ThreadData threadData[numThreads];
+    TileThreadData threadData[numThreads];
 
     // define the range of tiles to get and set
     INT32 tileRowMin =  0;



More information about the mapguide-commits mailing list