[jbpm-commits] JBoss JBPM SVN: r6254 - in jbpm3/branches/jbpm-3.2-soa/modules/enterprise: src/test/java/org/jbpm/enterprise/ejbtimer and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Apr 8 02:13:05 EDT 2010


Author: alex.guizar at jboss.com
Date: 2010-04-08 02:13:04 -0400 (Thu, 08 Apr 2010)
New Revision: 6254

Modified:
   jbpm3/branches/jbpm-3.2-soa/modules/enterprise/pom.xml
   jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
Log:
exclude JBPM-1952 test from DB2 suite because it times out

Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/pom.xml	2010-04-08 05:44:42 UTC (rev 6253)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/pom.xml	2010-04-08 06:13:04 UTC (rev 6254)
@@ -183,7 +183,7 @@
   <!-- Profiles -->
   <profiles>
     <!--
-      Name:  no-jboss-bind-address
+      Name: no-jboss-bind-address
       Desc: Skip tests if no bind address is given
     -->
     <profile>
@@ -229,44 +229,15 @@
     </profile>
 
     <!-- 
-      Name:  no-database
-      Desc: Default database test exclusions
+      Name: db2
+      Desc: DB2 test exclusions
     -->
     <profile>
-      <id>no-database</id>
+      <id>db2</id>
       <activation>
         <property>
-          <name>!database</name>
-        </property>
-      </activation>
-      <properties>
-        <database>hsqldb</database>
-      </properties>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <excludes>
-                <!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
-                <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
-              </excludes>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-
-    <!-- 
-      Name:  hsqldb
-      Description: HSQLDB test exclusions
-    -->
-    <profile>
-      <id>hsqldb</id>
-      <activation>
-        <property>
           <name>database</name>
-          <value>hsqldb</value>
+          <value>db2</value>
         </property>
       </activation>
       <build>
@@ -275,8 +246,8 @@
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
               <excludes>
-                <!-- [JBPM-1708] Enterprise EjbSchedulerTest fails -->
-                <exclude>org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java</exclude>
+                <!-- [JBPM-1952] test times out under DB2 -->
+                <exclude>org/jbpm/enterprise/jbpm1952/JBPM1952Test.java</exclude>
               </excludes>
             </configuration>
           </plugin>

Modified: jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java	2010-04-08 05:44:42 UTC (rev 6253)
+++ jbpm3/branches/jbpm-3.2-soa/modules/enterprise/src/test/java/org/jbpm/enterprise/ejbtimer/EjbSchedulerTest.java	2010-04-08 06:13:04 UTC (rev 6254)
@@ -37,6 +37,7 @@
 /**
  * Exercises for the {@linkplain EntitySchedulerService EJB scheduler service}.
  * 
+ * @see <a href="https://jira.jboss.org/jira/browse/JBPM-1708">JBPM-1708</a>
  * @author Alejandro Guizar
  */
 public class EjbSchedulerTest extends AbstractEnterpriseTestCase {
@@ -46,57 +47,67 @@
   }
 
   public void testScheduleFuture() throws Exception {
+    // [JBPM-1708] EJB scheduler does not work with HSQLDB because
+    // multiple last resources are disallowed by default
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='future'>"
-        + "  <event type='process-end'>"
-        + "    <action expression='#{eventCallback.processEnd}'/>"
-        + "  </event>"
-        + "  <start-state name='start'>"
-        + "    <transition to='a' />"
-        + "  </start-state>"
-        + "  <state name='a'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='end' />"
-        + "  </state>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='process-end'>"
+      + "    <action expression='#{eventCallback.processEnd}'/>"
+      + "  </event>"
+      + "  <start-state name='start'>"
+      + "    <transition to='a' />"
+      + "  </start-state>"
+      + "  <state name='a'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='end' />"
+      + "  </state>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     long processInstanceId = startProcessInstance("future").getId();
     EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   public void testSchedulePast() throws Exception {
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='past'>"
-        + "  <event type='process-end'>"
-        + "    <action expression='#{eventCallback.processEnd}'/>"
-        + "  </event>"
-        + "  <start-state name='start'>"
-        + "    <transition to='a' />"
-        + "  </start-state>"
-        + "  <state name='a'>"
-        + "    <timer duedate='-1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='end' />"
-        + "  </state>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='process-end'>"
+      + "    <action expression='#{eventCallback.processEnd}'/>"
+      + "  </event>"
+      + "  <start-state name='start'>"
+      + "    <transition to='a' />"
+      + "  </start-state>"
+      + "  <state name='a'>"
+      + "    <timer duedate='-1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='end' />"
+      + "  </state>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     long processInstanceId = startProcessInstance("past").getId();
     EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   public void testScheduleRepeat() throws Exception {
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='repeat'>"
-        + "  <event type='timer'>"
-        + "    <action expression='#{eventCallback.timer}'/>"
-        + "  </event>"
-        + "  <start-state name='start'>"
-        + "    <transition to='a' />"
-        + "  </start-state>"
-        + "  <state name='a'>"
-        + "    <timer duedate='1 second' repeat='1 second' />"
-        + "    <transition to='end' />"
-        + "  </state>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='timer'>"
+      + "    <action expression='#{eventCallback.timer}'/>"
+      + "  </event>"
+      + "  <start-state name='start'>"
+      + "    <transition to='a' />"
+      + "  </start-state>"
+      + "  <state name='a'>"
+      + "    <timer duedate='1 second' repeat='1 second' />"
+      + "    <transition to='end' />"
+      + "  </state>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     ProcessInstance processInstance = startProcessInstance("repeat");
     long processInstanceId = processInstance.getId();
     for (int i = 0; i < 3; i++) {
@@ -104,26 +115,29 @@
       assertEquals("a", getProcessInstanceState(processInstanceId));
     }
     signalToken(processInstance.getRootToken().getId());
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   public void testCancel() throws Exception {
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='cancel'>"
-        + "  <event type='timer'>"
-        + "    <action expression='#{eventCallback.timer}'/>"
-        + "  </event>"
-        + "  <start-state name='start'>"
-        + "    <transition to='a' />"
-        + "  </start-state>"
-        + "  <state name='a'>"
-        + "    <timer duedate='1 second' repeat='1 second' />"
-        + "    <transition to='b' />"
-        + "  </state>"
-        + "  <state name='b'>"
-        + "    <transition to='end' />"
-        + "  </state>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='timer'>"
+      + "    <action expression='#{eventCallback.timer}'/>"
+      + "  </event>"
+      + "  <start-state name='start'>"
+      + "    <transition to='a' />"
+      + "  </start-state>"
+      + "  <state name='a'>"
+      + "    <timer duedate='1 second' repeat='1 second' />"
+      + "    <transition to='b' />"
+      + "  </state>"
+      + "  <state name='b'>"
+      + "    <transition to='end' />"
+      + "  </state>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     ProcessInstance processInstance = startProcessInstance("cancel");
     long processInstanceId = processInstance.getId();
     // first expiration
@@ -147,106 +161,112 @@
     }
     // proceed to end state
     signalToken(rootTokenId);
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   public void testScheduleSequence() throws Exception {
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='sequence'>"
-        + "  <event type='process-end'>"
-        + "    <action expression='#{eventCallback.processEnd}'/>"
-        + "  </event>"
-        + "  <event type='timer'>"
-        + "    <action expression='#{eventCallback.timer}'/>"
-        + "  </event>"
-        + "  <start-state>"
-        + "    <transition to='a' />"
-        + "  </start-state>"
-        + "  <state name='a'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='b' />"
-        + "  </state>"
-        + "  <state name='b'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='c' />"
-        + "  </state>"
-        + "  <state name='c'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='d' />"
-        + "  </state>"
-        + "  <state name='d'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='e' />"
-        + "  </state>"
-        + "  <state name='e'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='end' />"
-        + "  </state>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='process-end'>"
+      + "    <action expression='#{eventCallback.processEnd}'/>"
+      + "  </event>"
+      + "  <event type='timer'>"
+      + "    <action expression='#{eventCallback.timer}'/>"
+      + "  </event>"
+      + "  <start-state>"
+      + "    <transition to='a' />"
+      + "  </start-state>"
+      + "  <state name='a'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='b' />"
+      + "  </state>"
+      + "  <state name='b'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='c' />"
+      + "  </state>"
+      + "  <state name='c'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='d' />"
+      + "  </state>"
+      + "  <state name='d'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='e' />"
+      + "  </state>"
+      + "  <state name='e'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='end' />"
+      + "  </state>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     long processInstanceId = startProcessInstance("sequence").getId();
     for (char state = 'b'; state <= 'e'; state++) {
       EventCallback.waitForEvent(Event.EVENTTYPE_TIMER);
       assertEquals(Character.toString(state), getProcessInstanceState(processInstanceId));
     }
     EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   public void testScheduleFork() throws Exception {
+    if (getHibernateDialect().indexOf("HSQL") != -1) return;
+
     deployProcessDefinition("<process-definition name='fork'>"
-        + "  <event type='process-end'>"
-        + "    <action expression='#{eventCallback.processEnd}'/>"
-        + "  </event>"
-        + "  <start-state>"
-        + "    <transition to='f' />"
-        + "  </start-state>"
-        + "  <fork name='f'>"
-        + "    <transition name='a' to='a' />"
-        + "    <transition name='b' to='b' />"
-        + "    <transition name='c' to='c' />"
-        + "    <transition name='d' to='d' />"
-        + "    <transition name='e' to='e' />"
-        + "  </fork>"
-        + "  <state name='a'>"
-        + "    <timer duedate='0 seconds' transition='timeout' />"
-        + "    <transition name='timeout' to='j' />"
-        + "  </state>"
-        + "  <state name='b'>"
-        + "    <timer duedate='1 second' transition='timeout' />"
-        + "    <transition name='timeout' to='j' />"
-        + "  </state>"
-        + "  <state name='c'>"
-        + "    <timer duedate='2 seconds' transition='timeout' />"
-        + "    <transition name='timeout' to='j' />"
-        + "  </state>"
-        + "  <state name='d'>"
-        + "    <timer duedate='3 seconds' transition='timeout' />"
-        + "    <transition name='timeout' to='j' />"
-        + "  </state>"
-        + "  <state name='e'>"
-        + "    <timer duedate='4 seconds' transition='timeout' />"
-        + "    <transition name='timeout' to='j' />"
-        + "  </state>"
-        + "  <join name='j' async='exclusive' lock='UPGRADE'>"
-        + "    <transition to='end' />"
-        + "  </join>"
-        + "  <end-state name='end' />"
-        + "</process-definition>");
+      + "  <event type='process-end'>"
+      + "    <action expression='#{eventCallback.processEnd}'/>"
+      + "  </event>"
+      + "  <start-state>"
+      + "    <transition to='f' />"
+      + "  </start-state>"
+      + "  <fork name='f'>"
+      + "    <transition name='a' to='a' />"
+      + "    <transition name='b' to='b' />"
+      + "    <transition name='c' to='c' />"
+      + "    <transition name='d' to='d' />"
+      + "    <transition name='e' to='e' />"
+      + "  </fork>"
+      + "  <state name='a'>"
+      + "    <timer duedate='0 seconds' transition='timeout' />"
+      + "    <transition name='timeout' to='j' />"
+      + "  </state>"
+      + "  <state name='b'>"
+      + "    <timer duedate='1 second' transition='timeout' />"
+      + "    <transition name='timeout' to='j' />"
+      + "  </state>"
+      + "  <state name='c'>"
+      + "    <timer duedate='2 seconds' transition='timeout' />"
+      + "    <transition name='timeout' to='j' />"
+      + "  </state>"
+      + "  <state name='d'>"
+      + "    <timer duedate='3 seconds' transition='timeout' />"
+      + "    <transition name='timeout' to='j' />"
+      + "  </state>"
+      + "  <state name='e'>"
+      + "    <timer duedate='4 seconds' transition='timeout' />"
+      + "    <transition name='timeout' to='j' />"
+      + "  </state>"
+      + "  <join name='j' async='exclusive' lock='UPGRADE'>"
+      + "    <transition to='end' />"
+      + "  </join>"
+      + "  <end-state name='end' />"
+      + "</process-definition>");
     long processInstanceId = startProcessInstance("fork").getId();
     EventCallback.waitForEvent(Event.EVENTTYPE_PROCESS_END);
-    assertTrue("expected process instance " + processInstanceId + " to have ended", hasProcessInstanceEnded(processInstanceId));
+    assertTrue("expected process instance " + processInstanceId + " to have ended",
+      hasProcessInstanceEnded(processInstanceId));
   }
 
   private String getProcessInstanceState(final long processInstanceId) throws RemoteException {
     return (String) commandService.execute(new Command() {
-
       private static final long serialVersionUID = 1L;
 
       public Object execute(JbpmContext jbpmContext) throws Exception {
         return jbpmContext.loadProcessInstance(processInstanceId)
-            .getRootToken()
-            .getNode()
-            .getName();
+          .getRootToken()
+          .getNode()
+          .getName();
       }
     });
   }



More information about the jbpm-commits mailing list