From do-not-reply at jboss.org Thu Oct 14 14:09:32 2010
Content-Type: multipart/mixed; boundary="===============3364768572811579015=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: jbpm-commits at lists.jboss.org
Subject: [jbpm-commits] JBoss JBPM SVN: r6760 - in
jbpm3/branches/jbpm-3.2-soa/core/src/test: java/org/jbpm/jbpm2959 and 3 other
directories.
Date: Thu, 14 Oct 2010 14:09:32 -0400
Message-ID: <201010141809.o9EI9Wf5012264@svn01.web.mwc.hst.phx2.redhat.com>
--===============3364768572811579015==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: alex.guizar(a)jboss.com
Date: 2010-10-14 14:09:32 -0400 (Thu, 14 Oct 2010)
New Revision: 6760
Added:
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2959/
jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2959/JBPM295=
9Test.java
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/gp=
d.xml
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/pr=
ocessdefinition.xml
Modified:
jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/log4j.xml
Log:
JBPM-2959 check in provided test process
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2959/JBP=
M2959Test.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2959/JBPM29=
59Test.java (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm2959/JBPM29=
59Test.java 2010-10-14 18:09:32 UTC (rev 6760)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.jbpm2959;
+
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Backport the dispatcher thread from jBPM 4 to avoid race conditions wit=
h multiple JobExecutor
+ * threads.
+ * =
+ * @see JBPM-2959
+ * @author Alejandro Guizar
+ */
+public class JBPM2959Test extends AbstractDbTestCase {
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ // [JBPM-2115] multiple threads not supported on DB2 < 9.7
+ // multiple threads not be supported on HSQL
+ String dialect =3D getHibernateDialect();
+ if (dialect.indexOf("DB2") =3D=3D -1 && dialect.indexOf("HSQL") =3D=3D=
-1) {
+ jbpmConfiguration.getJobExecutor().setNbrOfThreads(4);
+ }
+
+ ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso=
urce("org/jbpm/jbpm2959/processdefinition.xml");
+ deployProcessDefinition(processDefinition);
+ }
+
+ protected void tearDown() throws Exception {
+ jbpmConfiguration.getJobExecutor().setNbrOfThreads(1);
+ super.tearDown();
+ }
+
+ public void testDeadlockAtJobInsert() {
+ ProcessInstance processInstance =3D jbpmContext.newProcessInstanceForU=
pdate("jbpm2959");
+ processInstance.signal();
+
+ processJobs();
+ processInstance =3D jbpmContext.loadProcessInstance(processInstance.ge=
tId());
+ assert processInstance.hasEnded() : "expected " + processInstance + " =
to have ended";
+ }
+}
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbp=
m/jbpm2959/JBPM2959Test.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/log4j.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/log4j.xml 2010-10-1=
3 05:11:34 UTC (rev 6759)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/log4j.xml 2010-10-1=
4 18:09:32 UTC (rev 6760)
@@ -34,7 +34,7 @@
=
-
+
=
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm295=
9/gpd.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/g=
pd.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/g=
pd.xml 2010-10-14 18:09:32 UTC (rev 6760)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/jbpm2959/gpd.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm295=
9/processdefinition.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/p=
rocessdefinition.xml (rev 0)
+++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm2959/p=
rocessdefinition.xml 2010-10-14 18:09:32 UTC (rev 6760)
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or=
g/jbpm/jbpm2959/processdefinition.xml
___________________________________________________________________
Name: svn:eol-style
+ native
--===============3364768572811579015==--