AnsweredAssumed Answered

Unit testing a process containing an intermediateCatchEvent

Question asked by sor1 on Oct 1, 2012
Latest reply on Oct 3, 2012 by sor1
I had a process with asynchronous continuation: I have a service task of type aync=true. My unit tests use this method:
TestHelper.waitForJobExecutorToProcessAllJobs(((ProcessEngineImpl) processEngine).getProcessEngineConfiguration(), maxMillisToWait, intervalMillis);
I have replaced the asynchronous task by a intermediateCatchEvent with timeDuration = PT5S.

Now the unit tests do not work because this line is always evaluated to false:
!managementService.createJobQuery().executable().list().isEmpty() //areJobsAvailable
Do you understand why?