droolsjbpm/jbpm — pull request #208 by tkobayas (2014-09-02 09:13:55+00:00)
Title: JBPM-4443 Adding quartz timer tests

This testContinueTimer() is trying to test a quartz timer surviving server restart. As commented in testContinueGlobalTestService(), it's not a real db but an in-memory db. But doesn't this test make sense? Please let me know if this test is not appropriate.

testContinueTimer() passes asserts (= Timer is correctly fired) but you will see tons of Exceptions in timer threads. I guess we need let timer service wait until a RuntimeEngine is initialized.

====
java.lang.NullPointerException
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:67)
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:46)
at org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:279)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
...

====
java.lang.RuntimeException: No runtime engine found, could not be initialized yet
at org.jbpm.process.core.timer.impl.GlobalTimerService.getCommandService(GlobalTimerService.java:210)
at org.jbpm.process.core.timer.impl.GlobalTimerService.getCommandService(GlobalTimerService.java:192)
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:67)
at org.jbpm.persistence.timer.GlobalJpaTimerJobInstance.call(GlobalJpaTimerJobInstance.java:46)
at org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:279)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
...