Skip to content

Commit dc3eabe

Browse files
committed
Increase the interval time for checking if there are jobs in the InstantTimeTimerEventTest
The InstantTimeTimerEventTest is a test which test timer jobs. This means that we can have a scenario when the wait returns, but there are still jobs. The scenario (due to race conditions is the following). We start with a timer job and start the async executor * Test Thread: Check async job list is empty * Async Thread: Move timer job to async job * Test Thread: Check timer job list is empty Due to race conditions the test thread thinks that there are no more jobs and stops waiting and continues to the next check.
1 parent 96251b7 commit dc3eabe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/event/timer/InstantTimeTimerEventTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void testVariableExpressionBoundaryTimerEvent() {
6464
processEngineConfiguration.getClock().setCurrentTime(nowCal.getTime());
6565

6666
try {
67-
waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(10000L, 25L);
67+
waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(10000L, 200L);
6868
assertThat(jobQuery.count()).isZero();
6969

7070
assertProcessEnded(pi.getId());
@@ -87,7 +87,7 @@ public void testBeanExpressionBoundaryTimerEvent() {
8787
processEngineConfiguration.getClock().setCurrentTime(nowCal.getTime());
8888

8989
try {
90-
waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(10000L, 25L);
90+
waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(10000L, 200L);
9191
assertThat(jobQuery.count()).isZero();
9292

9393
assertProcessEnded(pi.getId());

0 commit comments

Comments
 (0)