[jbpm-commits] JBoss JBPM SVN: r2072 - in jbpm3/trunk/modules/enterprise: src/test/java/org/jbpm and 5 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Sep 2 21:50:36 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-09-02 21:50:36 -0400 (Tue, 02 Sep 2008)
New Revision: 2072
Added:
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/ArchiveDeployer.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestHelper.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestSetup.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/JBossArchiveDeployer.java
jbpm3/trunk/modules/enterprise/src/test/resources/jndi.properties
jbpm3/trunk/modules/enterprise/src/test/resources/tst.policy
Modified:
jbpm3/trunk/modules/enterprise/pom.xml
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AppServerConfigurationsTest.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java
jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
Log:
Deploy enterprise-test.war as part of the test setup
Modified: jbpm3/trunk/modules/enterprise/pom.xml
===================================================================
--- jbpm3/trunk/modules/enterprise/pom.xml 2008-09-02 13:33:34 UTC (rev 2071)
+++ jbpm3/trunk/modules/enterprise/pom.xml 2008-09-03 01:50:36 UTC (rev 2072)
@@ -63,6 +63,13 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.client</groupId>
+ <artifactId>jbossall-client</artifactId>
+ <!-- verify that this version works for all target containers -->
+ <version>4.2.2.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.cactus</groupId>
<artifactId>cactus.integration.shared.api</artifactId>
<scope>test</scope>
@@ -147,35 +154,7 @@
</excludes>
</configuration>
</plugin>
- <!--
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>deploy-tests</id>
- <phase>process-test-classes</phase>
- <goals>
- <goal>deploy</goal>
- </goals>
- <configuration>
- <fileName>${project.build.directory}/test-libs/enterprise-test.war</fileName>
- </configuration>
- </execution>
- <execution>
- <id>undeploy-tests</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>undeploy</goal>
- </goals>
- <configuration>
- <fileName>${project.build.directory}/test-libs/enterprise-test.war</fileName>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
- <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
Added: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/ArchiveDeployer.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/ArchiveDeployer.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/ArchiveDeployer.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,41 @@
+/*
+ * 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;
+
+import java.net.URL;
+
+/**
+ * An archive deployer
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-May-2006
+ */
+public interface ArchiveDeployer
+{
+ /** Deploy the given archive
+ */
+ void deploy(URL archive) throws Exception;
+
+ /** Undeploy the given archive
+ */
+ void undeploy(URL archive) throws Exception;
+}
Property changes on: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/ArchiveDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestHelper.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestHelper.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestHelper.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,145 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Hashtable;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * An integration test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestHelper
+{
+ private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
+ private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+
+ private static MBeanServerConnection server;
+ private static String testArchiveDir;
+ private static String testResourcesDir;
+
+ /** Deploy the given archive
+ */
+ public void deploy(String archive) throws Exception
+ {
+ URL url = getArchiveFile(archive).toURL();
+ getDeployer().deploy(url);
+ }
+
+ /** Undeploy the given archive
+ */
+ public void undeploy(String archive) throws Exception
+ {
+ URL url = getArchiveFile(archive).toURL();
+ getDeployer().undeploy(url);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static MBeanServerConnection getServer()
+ {
+ if (server == null)
+ {
+ Hashtable jndiEnv = null;
+ try
+ {
+ InitialContext iniCtx = new InitialContext();
+ jndiEnv = iniCtx.getEnvironment();
+ server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+ }
+ catch (NamingException ex)
+ {
+ throw new RuntimeException("Cannot obtain MBeanServerConnection using jndi props: " + jndiEnv, ex);
+ }
+ }
+ return server;
+ }
+
+ private ArchiveDeployer getDeployer()
+ {
+ return new JBossArchiveDeployer(getServer());
+ }
+
+ /** Try to discover the URL for the deployment archive */
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ return getArchiveFile(archive).toURL();
+ }
+
+ /** Try to discover the File for the deployment archive */
+ public File getArchiveFile(String archive)
+ {
+ File file = new File(archive);
+ if (file.exists())
+ return file;
+
+ file = new File(getTestArchiveDir() + "/" + archive);
+ if (file.exists())
+ return file;
+
+ String notSet = (getTestArchiveDir() == null ? " System property '" + SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set." : "");
+ throw new IllegalArgumentException("Cannot obtain '" + getTestArchiveDir() + "/" + archive + "'." + notSet);
+ }
+
+ /** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource) throws MalformedURLException
+ {
+ return getResourceFile(resource).toURL();
+ }
+
+ /** Try to discover the File for the test resource */
+ public File getResourceFile(String resource)
+ {
+ File file = new File(resource);
+ if (file.exists())
+ return file;
+
+ file = new File(getTestResourcesDir() + "/" + resource);
+ if (file.exists())
+ return file;
+
+ throw new IllegalArgumentException("Cannot obtain '" + getTestResourcesDir() + "/" + resource + "'");
+ }
+
+ public static String getTestArchiveDir()
+ {
+ if (testArchiveDir == null)
+ testArchiveDir = System.getProperty(SYSPROP_TEST_ARCHIVE_DIRECTORY, "target/test-libs");
+
+ return testArchiveDir;
+ }
+
+ public static String getTestResourcesDir()
+ {
+ if (testResourcesDir == null)
+ testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY, "target/test-resource");
+
+ return testResourcesDir;
+ }
+}
Property changes on: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestSetup.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestSetup.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestSetup.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,159 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.NamingException;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * A test setup that deploys/undeploys archives
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class IntegrationTestSetup extends TestSetup
+{
+ private IntegrationTestHelper delegate = new IntegrationTestHelper();
+ private String[] archives = new String[0];
+ private ClassLoader originalClassLoader;
+
+ public IntegrationTestSetup(Class<?> testClass, String archiveList)
+ {
+ super(new TestSuite(testClass));
+ getArchiveArray(archiveList);
+ }
+
+ public IntegrationTestSetup(Test test, String archiveList)
+ {
+ super(test);
+ getArchiveArray(archiveList);
+ }
+
+ public IntegrationTestSetup(Test test)
+ {
+ super(test);
+ }
+
+ public File getArchiveFile(String archive)
+ {
+ return delegate.getArchiveFile(archive);
+ }
+
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ return delegate.getArchiveFile(archive).toURL();
+ }
+
+ public File getResourceFile(String resource)
+ {
+ return delegate.getResourceFile(resource);
+ }
+
+ public URL getResourceURL(String resource) throws MalformedURLException
+ {
+ return delegate.getResourceFile(resource).toURL();
+ }
+
+ private void getArchiveArray(String archiveList)
+ {
+ if (archiveList != null)
+ {
+ StringTokenizer st = new StringTokenizer(archiveList, ", ");
+ archives = new String[st.countTokens()];
+
+ for (int i = 0; i < archives.length; i++)
+ archives[i] = st.nextToken();
+ }
+ }
+
+ protected void setUp() throws Exception
+ {
+ List<URL> clientJars = new ArrayList<URL>();
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[i];
+ try
+ {
+ delegate.deploy(archive);
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ delegate.undeploy(archive);
+ }
+
+ if (archive.endsWith("-client.jar"))
+ {
+ URL archiveURL = getArchiveURL(archive);
+ clientJars.add(archiveURL);
+ }
+ }
+
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ originalClassLoader = parent;
+
+ // add client jars to the class loader
+ if (!clientJars.isEmpty())
+ {
+ URL[] urls = new URL[clientJars.size()];
+ for (int i = 0; i < clientJars.size(); i++)
+ {
+ urls[i] = clientJars.get(i);
+ }
+ URLClassLoader cl = new URLClassLoader(urls, parent);
+ Thread.currentThread().setContextClassLoader(cl);
+ }
+ }
+
+ protected void tearDown() throws Exception
+ {
+ try
+ {
+ for (int i = 0; i < archives.length; i++)
+ {
+ String archive = archives[archives.length - i - 1];
+ delegate.undeploy(archive);
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(originalClassLoader);
+ }
+ }
+
+ public MBeanServerConnection getServer() throws NamingException
+ {
+ return IntegrationTestHelper.getServer();
+ }
+}
Property changes on: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/IntegrationTestSetup.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/JBossArchiveDeployer.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/JBossArchiveDeployer.java (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/JBossArchiveDeployer.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+/**
+ * An archive deployer that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossArchiveDeployer implements ArchiveDeployer
+{
+ private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+ private MBeanServerConnection server;
+
+ public JBossArchiveDeployer(MBeanServerConnection server)
+ {
+ this.server = server;
+ }
+
+ public void deploy(URL url) throws Exception
+ {
+ invokeMainDeployer("deploy", url);
+ }
+
+ public void undeploy(URL url) throws Exception
+ {
+ invokeMainDeployer("undeploy", url);
+ }
+
+ private void invokeMainDeployer(String methodName, URL url) throws Exception
+ {
+ server.invoke(new ObjectName(MAIN_DEPLOYER), methodName, new Object[] { url }, new String[] { "java.net.URL" });
+ }
+}
Property changes on: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/JBossArchiveDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AppServerConfigurationsTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AppServerConfigurationsTest.java 2008-09-02 13:33:34 UTC (rev 2071)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/AppServerConfigurationsTest.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -21,33 +21,45 @@
*/
package org.jbpm.enterprise;
+import junit.framework.Test;
+
import org.apache.cactus.ServletTestCase;
+import org.jbpm.IntegrationTestSetup;
import org.jbpm.JbpmConfiguration;
import org.jbpm.msg.jms.JmsMessageServiceFactoryImpl;
import org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory;
import org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory;
import org.jbpm.svc.Services;
-public class AppServerConfigurationsTest extends ServletTestCase {
-
+public class AppServerConfigurationsTest extends ServletTestCase
+{
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
- public void testUnavailabilityOfTheJobExecutor() {
+ public static Test suite() throws Exception
+ {
+ return new IntegrationTestSetup(AppServerConfigurationsTest.class, "enterprise-test.war");
+ }
+
+ public void testUnavailabilityOfTheJobExecutor()
+ {
assertNull(jbpmConfiguration.getJobExecutor());
}
- public void testJtaDbPersistenceFactoryConfiguration() {
+ public void testJtaDbPersistenceFactoryConfiguration()
+ {
assertSame(JtaDbPersistenceServiceFactory.class, jbpmConfiguration.getServiceFactory(Services.SERVICENAME_PERSISTENCE).getClass());
- JtaDbPersistenceServiceFactory persistenceServiceFactory = (JtaDbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
+ JtaDbPersistenceServiceFactory persistenceServiceFactory = (JtaDbPersistenceServiceFactory)jbpmConfiguration.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
assertFalse(persistenceServiceFactory.isTransactionEnabled());
assertTrue(persistenceServiceFactory.isCurrentSessionEnabled());
}
- public void testJmsMessageServiceFactoryConfiguration() {
+ public void testJmsMessageServiceFactoryConfiguration()
+ {
assertSame(JmsMessageServiceFactoryImpl.class, jbpmConfiguration.getServiceFactory(Services.SERVICENAME_MESSAGE).getClass());
}
- public void testEjbSchedulerServiceFactoryConfiguration() {
+ public void testEjbSchedulerServiceFactoryConfiguration()
+ {
assertSame(EntitySchedulerServiceFactory.class, jbpmConfiguration.getServiceFactory(Services.SERVICENAME_SCHEDULER).getClass());
}
}
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-02 13:33:34 UTC (rev 2071)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/msg/jms/AsyncProcessingTest.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -30,10 +30,13 @@
import javax.naming.InitialContext;
+import junit.framework.Test;
+
import org.apache.cactus.ServletTestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;
+import org.jbpm.IntegrationTestSetup;
import org.jbpm.JbpmContext;
import org.jbpm.command.Command;
import org.jbpm.command.DeployProcessCommand;
@@ -50,6 +53,11 @@
static int nbrOfConcurrentProcessExecutions = 20;
static int maxWaitTime = 30000;
+ public static Test suite() throws Exception
+ {
+ return new IntegrationTestSetup(AsyncProcessingTest.class, "enterprise-test.war");
+ }
+
protected void setUp() throws Exception {
InitialContext initialContext = new InitialContext();
RemoteCommandServiceHome localCommandServiceHome = (RemoteCommandServiceHome) initialContext.lookup("ejb/CommandServiceBean");
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java 2008-09-02 13:33:34 UTC (rev 2071)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/persistence/jta/JtaDbPersistenceTest.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -26,11 +26,15 @@
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
+import junit.framework.Test;
+
import org.apache.cactus.ServletTestCase;
+import org.jbpm.IntegrationTestSetup;
import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.scheduler.ejbtimer.EjbSchedulerTest;
public class JtaDbPersistenceTest extends ServletTestCase {
@@ -40,6 +44,11 @@
private static long definitionId;
+ public static Test suite() throws Exception
+ {
+ return new IntegrationTestSetup(EjbSchedulerTest.class, "enterprise-test.war");
+ }
+
protected void setUp() throws Exception {
jbpmConfiguration = JbpmConfiguration.getInstance();
getUserTransaction();
Modified: jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-02 13:33:34 UTC (rev 2071)
+++ jbpm3/trunk/modules/enterprise/src/test/java/org/jbpm/scheduler/ejbtimer/EjbSchedulerTest.java 2008-09-03 01:50:36 UTC (rev 2072)
@@ -23,7 +23,10 @@
import javax.naming.InitialContext;
+import junit.framework.Test;
+
import org.apache.cactus.ServletTestCase;
+import org.jbpm.IntegrationTestSetup;
import org.jbpm.JbpmContext;
import org.jbpm.command.Command;
import org.jbpm.command.DeployProcessCommand;
@@ -43,6 +46,11 @@
private static LocalCommandServiceHome commandServiceHome;
+ public static Test suite() throws Exception
+ {
+ return new IntegrationTestSetup(EjbSchedulerTest.class, "enterprise-test.war");
+ }
+
protected void setUp() throws Exception {
if (commandServiceHome == null) {
InitialContext initialContext = new InitialContext();
Added: jbpm3/trunk/modules/enterprise/src/test/resources/jndi.properties
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/resources/jndi.properties (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/resources/jndi.properties 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
Added: jbpm3/trunk/modules/enterprise/src/test/resources/tst.policy
===================================================================
--- jbpm3/trunk/modules/enterprise/src/test/resources/tst.policy (rev 0)
+++ jbpm3/trunk/modules/enterprise/src/test/resources/tst.policy 2008-09-03 01:50:36 UTC (rev 2072)
@@ -0,0 +1,4 @@
+grant {
+ permission java.security.AllPermission;
+};
+
More information about the jbpm-commits
mailing list