Author: manaRH
Date: 2011-02-16 10:49:20 -0500 (Wed, 16 Feb 2011)
New Revision: 14053
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
Log:
JBPAPP-5517 - asynchronous integration test in jbpm-jpdl process definition
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-02-16
15:47:09 UTC (rev 14052)
+++
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-02-16
15:49:20 UTC (rev 14053)
@@ -1,6 +1,11 @@
package org.jboss.seam.test.integration;
+import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
+import org.jboss.seam.annotations.async.Asynchronous;
import org.jboss.seam.annotations.bpm.CreateProcess;
import org.jboss.seam.mock.SeamTest;
import org.testng.annotations.Test;
@@ -46,7 +51,7 @@
}.run();
}
- @Test
+ @Test (dependsOnMethods = "asyncExceptionHandling" )
public void exceptionHandling() throws Exception
{
new FacesRequest(){
@@ -66,6 +71,19 @@
}
}.run();
}
+
+ @Test
+ public void asyncExceptionHandling() throws Exception
+ {
+ new FacesRequest(){
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{bpmTest.startAsyncExceptionPageflow}");
+ }
+ }.run();
+ }
@Name("bpmTest")
@@ -82,5 +100,23 @@
public void startExceptionPageflow()
{
}
+
+ @CreateProcess(definition="TestProcess6" )
+ public void startAsyncExceptionPageflow()
+ {
+ }
}
+
+ @Name("asyncEcho")
+ //(a)Scope(ScopeType.EVENT)
+ public class AsynchEcho {
+
+ @Asynchronous //(a)Transactional(TransactionPropagationType.REQUIRED)
+ public void asyncExceptionThrowing()
+ {
+ System.out.println("calling async method ********************");
+ //throw new RuntimeException("Exception is thrown - test handling");
+ }
+ }
+
}
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-02-16
15:47:09 UTC (rev 14052)
+++
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-02-16
15:49:20 UTC (rev 14053)
@@ -3,6 +3,10 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.TransactionPropagationType;
+import org.jboss.seam.annotations.Transactional;
+import org.jboss.seam.annotations.async.Asynchronous;
import org.jboss.seam.annotations.bpm.CreateProcess;
@Name("seamExpressionEvaluatorTestController")
@@ -59,7 +63,13 @@
public void exceptionThrowing()
{
throw new RuntimeException("Exception is thrown - test handling");
+ }
+
+ @Asynchronous //(a)Transactional(TransactionPropagationType.REQUIRED)
+ public void asyncExceptionThrowing()
+ {
+ System.out.println("calling async method ********************");
+ //throw new RuntimeException("Exception is thrown - test handling");
}
-
}
\ No newline at end of file