svn commit: r573973 - in /ofbiz/trunk/framework/service: src/org/ofbiz/service/test/ServiceEngineTestServices.java testdef/data/ServiceDeadLockRetryAssertData.xml testdef/data/ServiceTestData.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r573973 - in /ofbiz/trunk/framework/service: src/org/ofbiz/service/test/ServiceEngineTestServices.java testdef/data/ServiceDeadLockRetryAssertData.xml testdef/data/ServiceTestData.xml

jonesde
Author: jonesde
Date: Sun Sep  9 02:39:13 2007
New Revision: 573973

URL: http://svn.apache.org/viewvc?rev=573973&view=rev
Log:
Added some tougher variations on the deadlock retry test case to make sure both threads succeed in the end; note that this appears to be failure for the non-retry thread so the retry code and/or the test cases need a little more work

Modified:
    ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java
    ofbiz/trunk/framework/service/testdef/data/ServiceDeadLockRetryAssertData.xml
    ofbiz/trunk/framework/service/testdef/data/ServiceTestData.xml

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java?rev=573973&r1=573972&r2=573973&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java Sun Sep  9 02:39:13 2007
@@ -83,6 +83,11 @@
             GenericValue testingTypeB = delegator.findByPrimaryKey("TestingType", UtilMisc.toMap("testingTypeId", "SVCLRT_B"));
             testingTypeB.set("description", "New description for SVCLRT_B");
             testingTypeB.store();
+
+            Debug.logInfo("In testServiceDeadLockRetryThreadA done with updating SVCLRT_B, updating SVCLRT_AONLY", module);
+            GenericValue testingTypeAOnly = delegator.findByPrimaryKey("TestingType", UtilMisc.toMap("testingTypeId", "SVCLRT_AONLY"));
+            testingTypeAOnly.set("description", "New description for SVCLRT_AONLY; this is only changed by thread A so if it doesn't match something happened to thread A!");
+            testingTypeAOnly.store();
         } catch (GenericEntityException e) {
             String errMsg = "Entity Engine Exception running dead lock test thread A: " + e.toString();
             Debug.logError(e, errMsg, module);
@@ -112,6 +117,11 @@
             GenericValue testingTypeA = delegator.findByPrimaryKey("TestingType", UtilMisc.toMap("testingTypeId", "SVCLRT_A"));
             testingTypeA.set("description", "New description for SVCLRT_A");
             testingTypeA.store();
+
+            Debug.logInfo("In testServiceDeadLockRetryThreadA done with updating SVCLRT_A, updating SVCLRT_BONLY", module);
+            GenericValue testingTypeAOnly = delegator.findByPrimaryKey("TestingType", UtilMisc.toMap("testingTypeId", "SVCLRT_BONLY"));
+            testingTypeAOnly.set("description", "New description for SVCLRT_BONLY; this is only changed by thread B so if it doesn't match something happened to thread B!");
+            testingTypeAOnly.store();
         } catch (GenericEntityException e) {
             String errMsg = "Entity Engine Exception running dead lock test thread B: " + e.toString();
             Debug.logError(e, errMsg, module);

Modified: ofbiz/trunk/framework/service/testdef/data/ServiceDeadLockRetryAssertData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/testdef/data/ServiceDeadLockRetryAssertData.xml?rev=573973&r1=573972&r2=573973&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/testdef/data/ServiceDeadLockRetryAssertData.xml (original)
+++ ofbiz/trunk/framework/service/testdef/data/ServiceDeadLockRetryAssertData.xml Sun Sep  9 02:39:13 2007
@@ -24,4 +24,7 @@
         make it into the database at the end. -->
     <TestingType testingTypeId="SVCLRT_A" description="New description for SVCLRT_A"/>
     <TestingType testingTypeId="SVCLRT_B" description="New description for SVCLRT_B"/>
+    <!-- these two are both changed only by their respective threads, checking to make sure both threads succeeded -->
+    <TestingType testingTypeId="SVCLRT_AONLY" description="New description for SVCLRT_AONLY; this is only changed by thread A so if it doesn't match something happened to thread A!"/>
+    <TestingType testingTypeId="SVCLRT_BONLY" description="New description for SVCLRT_BONLY; this is only changed by thread B so if it doesn't match something happened to thread B!"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/framework/service/testdef/data/ServiceTestData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/testdef/data/ServiceTestData.xml?rev=573973&r1=573972&r2=573973&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/testdef/data/ServiceTestData.xml (original)
+++ ofbiz/trunk/framework/service/testdef/data/ServiceTestData.xml Sun Sep  9 02:39:13 2007
@@ -21,6 +21,8 @@
     <!-- load data for service dead lock recovery test -->
     <TestingType testingTypeId="SVCLRT_A" description="Original description for SVCLRT_A"/>
     <TestingType testingTypeId="SVCLRT_B" description="Original description for SVCLRT_B"/>
+    <TestingType testingTypeId="SVCLRT_AONLY" description="Original description for SVCLRT_AONLY; only thread A will change this to make sure it is not failing"/>
+    <TestingType testingTypeId="SVCLRT_BONLY" description="Original description for SVCLRT_BONLY; only thread B will change this to make sure it is not failing"/>
     
     <!-- load data for service lock wait timeout recovery test -->
     <TestingType testingTypeId="SVCLWTRT" description="Original description for SVCLWTRT"/>