quarkus-zeebe
quarkus-zeebe copied to clipboard
waitForIdleState()
Perhaps it is more a question then a bug.
The Spring implentation for zeebe testing has zeebeTestEngine.waitForIdleState(). This is because of Threading issues with the engine to my understanding.
This the Quarkus implementation also provide something similar?
I am asking this because I have a test for my process which is looking for jobs to be closed when the camunda process is not there yet. Thus failing the test.
@mvdveek I don't understand your test. Do you have an example I can look at?
@mvdveek you can get the embedded zeebe engine from the static field in ZeebeTestEmbeddedResource. The engine has the method you're looking for:
ZeebeTestEmbeddedResource.ZEEBE_ENGINE.waitForIdleState(Duration.ofSeconds(10L));
In the next version, you can inject ZeebeTestEngine directly into the test.
@InjectZeebeTestEngine
ZeebeTestEngine engine;
test() {
engine.waitForIdleState(Duration.ofSeconds(10L));
}