Community

Timer trigger in Junit test

reply from Huisheng Xu in jBPM - View the full discussion

Hi Sameeh:

  I have known what are you want to do. But I donnot recommand to run a JobExecutor in the unit test. In the unit test environment, we shouldnot dependency the container environment to do things like that. Furthermore, if you have configured a JobExecutor and wait for  '20 seconds', you cannot exactly decide when the timer was executed, because the jobexecutor doesnot run in real time, commonly it will wait thirty second between every execution.

 

  So I think you shouldnot depend a JobExecutor to decide whether the Timer executed correctly. May be you can setup a integration test environment to verify this.

Reply to this message by going to Community

Start a new discussion in jBPM at Community