AnsweredAssumed Answered

ActivitiRule Unittests fail

Question asked by billdoor on Aug 11, 2014
Latest reply on Aug 19, 2014 by jbarrez

I have two testcases, modeled after the Template presented in this Forum. Each single one of them Succeeds, while executing both of them at the same time fails the second one, because "…processInstance updated in concurrent Transaction".

As both of them work fine, it seems the actions taken by ActivitiRule or the @Rule and @Depolyment annotations are not 100% isolated for each Testcase, which kind of contradicts the concept of Unittests i guess?

What am i missing?
Regards + my code and configuration:

Tests (Two times the exact same class with altering Name):

public classProcessTest1 {

   public ActivitiRule engine = new ActivitiRule();

   @Deployment (resources={"bpmn/processOne.bpmn20.xml"})
   public void startProcessCopy() throws Exception {
      RuntimeService runtimeService = engine.getRuntimeService();

      ProcessInstance instance = runtimeService.startProcessInstanceByKey("processOne");
      List<Task> taskList = engine.getTaskService().createTaskQuery().processInstanceId(instance.getId()).taskAssignee("kermit").list();
      Map<String, String> params = new HashMap<String, String>();
      params.put("numberOne", "900");
      params.put("numberTwo", "700");
      engine.getFormService().submitTaskFormData(taskList.get(0).getId(), params);


<beans xmlns=""

   <bean id="processEngineConfiguration"

      <property name="jdbcUrl" value="jdbc:h2:mem:activitiTesting;DB_CLOSE_DELAY=10;FILE_LOCK=FS" />
      <property name="jdbcDriver" value="org.h2.Driver" />
      <property name="jdbcUsername" value="sa" />
      <property name="jdbcPassword" value="" />
      <property name="databaseSchemaUpdate" value="drop-create" />
      <property name="jobExecutorActivate" value="true" />