-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zeebeTestEngine.increaseTime not working reliably for Spring Boot Tests #659
Comments
Same problem here. |
Hi @jonathanlukas , this issue still affects us and Roman has the same issue. Since you were involved in the forum discussion before I created this issue and know who could support internally at Camunda: Could you please get someone involved in this ticket so it gets fixed? Best, |
@tobiasschaefer I investigated the problem today and had some findings. I am currently checking with the zeebe team. |
@tobiasschaefer I just prepared a fixed version of the timer testing with additional working spring zeebe tests: |
Hi @jonathanlukas , thanks a lot! 💯 It's now working for me too 👍 |
Awesome! Now I just need to add something to the testing docs so that other people will not face the same issue. Do you have a proposal for that? In detail, the problem is that |
Describe the bug
I have a process test whose process includes an timer intermediate catch event with a duration of 15 minutes. Obviously, I don’t want the test to wait but want be be able to trigger the timer (or rather increase the time of the environment so that it fires).
Here is a nice working example which works: TimerTest.java 1
However, this previous example uses
@ZeebeProcessTest
and in my case I have@SpringBootTest @ZeebeSpringTest
and it doesn’t work reliably.To reproduce the issue I created a fork of the Camunda 8 Twitter Example: twitter-with-timer 2 in which I
@Test
with@RepeatedTest(10)
to make the error more obvious and reproducible.However, this test
See also discussion in the forum thread #50258
Expected behavior
Test should pass every time.
Log/Stacktrace
Repetition 1: failed on “zeebeTestEngine.waitForIdleState(DEFAULT);” (first line in method skipTimeout) with a timeout
Repetition 2: failed a few lines later on
“zeebeTestEngine.waitForIdleState(DEFAULT);” (last (!) line in method skipTimeout) with a timeout
Repetition 4 failed with “Mockito.verify(twitterService).tweet(“Hello world”);”
On the second invocation all 10 were successful:
On further invocations I get random results similar to the first and second invocation.
Note that the duration is quite different. I don’t know much about Zeebe internals but is there some configuration which can be set to make the timers being checked more often?
Environment:
@ZeebeSpringTest
, i.e. it uses the embedded process engineThe text was updated successfully, but these errors were encountered: