Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9342

disposeRuntimeEngine shouldn't throw exception if already closed

    Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      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. 

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gonzalomf Gonzalo Muñoz Fernández
                Reporter:
                gonzalomf Gonzalo Muñoz Fernández
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: