diff --git a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/EventHnadlingTest.java b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/EventHnadlingTest.java index e63d7592ed..8c1b5e9462 100644 --- a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/EventHnadlingTest.java +++ b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/concurrent/EventHnadlingTest.java @@ -117,6 +117,8 @@ public void testRunMultiEventProcessPerRequestRuntimeManager() { processInstance = ksession.getProcessInstance(processInstance.getId()); assertNull(processInstance); + + // close manager which will close session maintained by the manager manager.close(); @@ -173,6 +175,8 @@ public void testRunMultiEventProcessPerProcessInstanceRuntimeManager() { processInstance = ksession.getProcessInstance(processInstance.getId()); assertNull(processInstance); + + manager.disposeRuntimeEngine(runtime); // close manager which will close session maintained by the manager manager.close(); diff --git a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManagerTest.java b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManagerTest.java index f474479511..8de30f6337 100644 --- a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManagerTest.java +++ b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManagerTest.java @@ -364,6 +364,7 @@ public void beforeProcessStarted(ProcessStartedEvent event) { assertEquals(ksession1Id, ksessionUsed.iterator().next().longValue()); + manager.disposeRuntimeEngine(runtime); manager.close(); } diff --git a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerRequestRuntimeManagerTest.java b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerRequestRuntimeManagerTest.java index 97c92b500b..c038c156a3 100644 --- a/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerRequestRuntimeManagerTest.java +++ b/jbpm-runtime-manager/src/test/java/org/jbpm/runtime/manager/impl/PerRequestRuntimeManagerTest.java @@ -557,7 +557,7 @@ public void testMultiplePerRequestManagerFromSingleThread() { assertEquals(ProcessInstance.STATE_ACTIVE, processInstance2.getState()); manager.disposeRuntimeEngine(runtime1); - manager.disposeRuntimeEngine(runtime2); + manager2.disposeRuntimeEngine(runtime2); // close manager which will close session maintained by the manager manager.close();