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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -