From f13306ce45958ad46c179ef1e063a9a5f8a43011 Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Wed, 24 Jun 2009 10:21:26 +0000 Subject: [PATCH] Fix failing JBPMDeleteProcessTest after removal of derby dependencies - Run on real repository rather than fake derby one - Also tidied up classpath.unit.test in build.xml git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14881 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../workflow/jbpm/JBPMDeleteProcessTest.java | 45 +---- .../jbpmresources/hibernate.cfg.xml | 171 ------------------ 2 files changed, 9 insertions(+), 207 deletions(-) delete mode 100644 source/test-resources/jbpmresources/hibernate.cfg.xml diff --git a/source/java/org/alfresco/repo/workflow/jbpm/JBPMDeleteProcessTest.java b/source/java/org/alfresco/repo/workflow/jbpm/JBPMDeleteProcessTest.java index 90900e594b..60b0f73dce 100644 --- a/source/java/org/alfresco/repo/workflow/jbpm/JBPMDeleteProcessTest.java +++ b/source/java/org/alfresco/repo/workflow/jbpm/JBPMDeleteProcessTest.java @@ -27,8 +27,7 @@ package org.alfresco.repo.workflow.jbpm; import java.util.List; -import junit.framework.TestCase; - +import org.alfresco.util.BaseSpringTest; import org.jbpm.JbpmConfiguration; import org.jbpm.JbpmContext; import org.jbpm.db.GraphSession; @@ -47,43 +46,17 @@ import org.jbpm.taskmgmt.exe.TaskInstance; * @author davidc */ -public class JBPMDeleteProcessTest extends TestCase { +public class JBPMDeleteProcessTest extends BaseSpringTest { - static JbpmConfiguration jbpmConfiguration = null; - static long processId = -1L; - static String currentTokenPath = null; + JbpmConfiguration jbpmConfiguration; + long processId = -1L; + String currentTokenPath; - static { - jbpmConfiguration = JbpmConfiguration.parseXmlString( - "" + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - " " + - "" - ); - } - public void setUp() { - jbpmConfiguration.createSchema(); - } - - public void tearDown() { - jbpmConfiguration.dropSchema(); + @Override + protected void onSetUpInTransaction() throws Exception + { + jbpmConfiguration = (JbpmConfiguration) getApplicationContext().getBean("jbpm_configuration"); } public void testDelete() { diff --git a/source/test-resources/jbpmresources/hibernate.cfg.xml b/source/test-resources/jbpmresources/hibernate.cfg.xml deleted file mode 100644 index 396343c1ef..0000000000 --- a/source/test-resources/jbpmresources/hibernate.cfg.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean - true - org.hibernate.dialect.DerbyDialect - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:./JBPM;create=true - sa - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -