Integration test for process with timer

Hi, I would like to ask you, if there is any solution for this situation. We are using Flowable (6.4.2) together with Spring (5.0.2). In a particular project is a process that consists of service tasks and timers. It is necessary to write an integration test for this process, but there is a little trouble :slight_smile: Process instance runs in a different thread than timer so it is not possible to go through whole process in single thread, and integration test ends when timer is reached. Bean SpringProcessEngineConfiguration is configured with asyncExecutorActivate set to true and for test purposes we use SyncTaskExecutor.

Thank you for any ideas. Michal

Hi Michal

I solve this problem by setting the property “asyncExecutorActivate” to false in my tests, so that I have to activate/execute the async tasks manually. That makes it much easier to control your tests.


See example: