-
Notifications
You must be signed in to change notification settings - Fork 15
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
Triggering of timer events produces inconsistent results. #935
Comments
@KristofferHogberg Could you try waiting for idle state before increasing the engine time? |
I should also explain why. Increasing the time of the engine is pretty fast. It could be that the engine at that point is still processing records (it's busy). So when you wait for busy state it might not have reached the timer yet. By waiting for idle state we know (on best effort) that the engine is no longer processing so it's likely waiting for something to trigger processing again. In this case that would be the timer. |
I should have mentioned that I have tried I have tried various durations in said methods but I still experince inconsistent behaviour in the tests. If I run the same test multiple times, the timer sometime triggers and other times it does not. |
Could you share the output of a failed run? The logged records should have an indication on what is happening. |
Exported log as xml. I should also mention that the point of failure has also been inconsistent. Thank you very much for the help! Test Results - BpmnUnitTestingDemoApplicationTests_propProductionImageRenderingTimeout.zip |
Here are the logs from a successful test run: Test Results - Success-BpmnUnitTestingDemoApplicationTests_propProductionImageRenderingTimeout.zip |
Thanks @KristofferHogberg! I had a look and you're running into #876 🙂
I fixed this yesterday and it will be part of the next patch release. Sorry for the inconvenience this causes you! |
Closing as dupe of #876. Please reopen if you think this is incorrect! |
Thank you for the assistance! |
Description
I am writing unit tests for BPMN process models using the Zeebe Process Test library. In two of my tests, I am using the
increaseTime()
method followed bywaitForBusyState()
(as recommended in the README) to wait for a timer event to trigger. However, I am experiencing inconsistent test results, as the timer event is not triggering consistently.Expected behaviour
Call
engine.increaseTime(Duration.ofSeconds(70));
to trigger a interruptive timer boundary event, set to trigger after 1 minute - PT1MReproduction steps
As you can see, I am using the increaseTime() method to simulate the passage of time and the waitForBusyState() method to wait for the timer event to trigger.
However, the timer (interruptive timer boundary event, set to trigger after 1 minute - PT1M) event is not triggering consistently, which is causing the test to fail intermittently. I have tried increasing the timeout value in the waitForBusyState() method, but this has not resolved the issue. Any feedback or suggestions on how to resolve this issue would be greatly appreciated.
Environment
22H2
OS build 19045.3324
Experiene: Windows Feature Experience Pack 1000.19041.1000.0
The text was updated successfully, but these errors were encountered: