Integration tests for BPMN Processes with Timers?

130 views
Skip to first unread message

Jonathan Christian (Jon) Gunter

unread,
May 10, 2022, 11:22:33 PM5/10/22
to Kogito development mailing list
I'm writing an integration test for a BPMN process I designed and deployed with Kogito. The process has a short timer (10s) and a couple custom tasks. Everything works great, except I'm not sure how to handle the timer.

I could use Thread.sleep (or use ScheduledThreadPoolExector) to wait for the timer to be complete in my integration tests. I'm wondering if there is more Kogito-acceptable way to do this? 

For testing processes with longer timers, is there a way to speed up the timer in test or mock it out? Again, these are integration tests, not unit tests.


Can someone point me to any examples or documentation that might help explain this?

Thanks in advance for your help!

Jon
Reply all
Reply to author
Forward
0 new messages