You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2009/11/12 22:19:23 UTC
svn commit: r835553 - in /ofbiz/branches/release09.04/framework:
common/servicedef/services_test.xml
common/src/org/ofbiz/common/CommonServices.java
service/servicedef/secas_test_se.xml
Author: lektran
Date: Thu Nov 12 21:19:22 2009
New Revision: 835553
URL: http://svn.apache.org/viewvc?rev=835553&view=rev
Log:
Merged from trunk r835548 and its dependent revision r835546
r835546:
Allow the duration of the blocking service test to be specified by the caller
r835548:
Delay the completion of the testServiceEcaGlobalEventExec test to allow the global ecas to complete before the next test is run, fixes OFBIZ-3124 reported by Jeremy Wickersheimer
Modified:
ofbiz/branches/release09.04/framework/common/servicedef/services_test.xml
ofbiz/branches/release09.04/framework/common/src/org/ofbiz/common/CommonServices.java
ofbiz/branches/release09.04/framework/service/servicedef/secas_test_se.xml
Modified: ofbiz/branches/release09.04/framework/common/servicedef/services_test.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/common/servicedef/services_test.xml?rev=835553&r1=835552&r2=835553&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/common/servicedef/services_test.xml (original)
+++ ofbiz/branches/release09.04/framework/common/servicedef/services_test.xml Thu Nov 12 21:19:22 2009
@@ -34,13 +34,14 @@
<service name="blockingTestScv" engine="java" export="true" validate="false" require-new-transaction="true" transaction-timeout="20"
location="org.ofbiz.common.CommonServices" invoke="blockingTestService">
<description>Blocking Test service</description>
+ <attribute name="duration" mode="IN" type="Long" optional="true"/>
<attribute name="message" type="String" mode="IN" optional="true"/>
<attribute name="resp" type="String" mode="OUT"/>
</service>
<service name="testError" engine="java" export="true" validate="false" require-new-transaction="true" max-retry="1"
location="org.ofbiz.common.CommonServices" invoke="returnErrorService">
</service>
- <!-- see serviceengin.xml to configure the rmi location alias -->
+ <!-- see serviceengine.xml to configure the rmi location alias -->
<service name="testRmi" engine="rmi" validate="false"
location="main-rmi" invoke="testScv">
<implements service="testScv"/>
Modified: ofbiz/branches/release09.04/framework/common/src/org/ofbiz/common/CommonServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/common/src/org/ofbiz/common/CommonServices.java?rev=835553&r1=835552&r2=835553&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/common/src/org/ofbiz/common/CommonServices.java (original)
+++ ofbiz/branches/release09.04/framework/common/src/org/ofbiz/common/CommonServices.java Thu Nov 12 21:19:22 2009
@@ -86,9 +86,13 @@
}
public static Map<String, Object> blockingTestService(DispatchContext dctx, Map<String, ?> context) {
- System.out.println("-----SERVICE BLOCKING----- : 30 seconds");
+ Long duration = (Long) context.get("duration");
+ if (duration == null) {
+ duration = 30000l;
+ }
+ System.out.println("-----SERVICE BLOCKING----- : " + duration/1000d +" seconds");
try {
- Thread.sleep(30000);
+ Thread.sleep(duration);
} catch (InterruptedException e) {
}
return CommonServices.testService(dctx, context);
Modified: ofbiz/branches/release09.04/framework/service/servicedef/secas_test_se.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release09.04/framework/service/servicedef/secas_test_se.xml?rev=835553&r1=835552&r2=835553&view=diff
==============================================================================
--- ofbiz/branches/release09.04/framework/service/servicedef/secas_test_se.xml (original)
+++ ofbiz/branches/release09.04/framework/service/servicedef/secas_test_se.xml Thu Nov 12 21:19:22 2009
@@ -26,4 +26,11 @@
<eca service="testServiceEcaGlobalEventExecToRollback" event="global-rollback">
<action service="testServiceEcaGlobalEventExecOnRollback" mode="sync"/>
</eca>
+
+ <!-- Note: This eca is used only to allow time for the global ecas above to
+ complete before the xml assertion test is run -->
+ <eca service="testServiceEcaGlobalEventExec" event="return">
+ <set field-name="duration" value="5000" format="long"/>
+ <action mode="sync" service="blockingTestScv"/>
+ </eca>
</service-eca>