-
Bug
-
Resolution: Done
-
Minor
-
7.43.0.Final
-
None
-
NEW
-
NEW
There is a race condition in this test:
- org.jbpm.test.functional.timer.GlobalQuartzDBTimerServiceTest.testQuartzJobDeletionOnManagerCloseWithTimerStart[2]
2020-09-11 03:26:25,064 [TestScheduler_Worker-3] INFO Job default-per-pinstance.default-per-pinstance-StartProcess-Minimal-StartProcess-1 threw a JobExecutionException: org.quartz.JobExecutionException: Exception when executing scheduled job at
org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:358) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) Caused by: java.lang.IllegalStateException: Runtime manager default-per-pinstance is already closed at
org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.disposeRuntimeEngine(PerProcessInstanceRuntimeManager.java:222) at
org.jbpm.process.core.timer.impl.GlobalTimerService$DisposableCommandService.dispose(GlobalTimerService.java:381) at
org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:95) at
org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:48) at
org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:339)
If the runtime is disposed externally (as forced in the test)
manager.disposeRuntimeEngine(runtime);
at the same time that the timer tries to dispose it after the call method, the thrown IllegalStateException (because isClosed) makes if fail.