Skip to content
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

[Backport stable/8.0] Realistic example test #278

Merged
merged 5 commits into from
Mar 30, 2022

Conversation

github-actions[bot]
Copy link

Description

Backport of #276 to stable/8.0.

relates to #273

We are still finetuning this to a sensible value. I had flaky tests when using 30ms. Therefore it is increased to 50ms to solve the flaky tests.

(cherry picked from commit fceedae)
When a process contains a call activity it will call another process instance. If we want to assert this process we need to create a new ProcessInstanceAssert object, with the process instance key of the called process instance. Thus far we had no way to do this, except for using inspections. This was a bit of a hassle. With this new method we can now assert that a process instance has called a different process and using extractingLatestCalledProcess we can obtain the assertions from this process. This fits the other extracting... methods we have for asserting over e.g. incidents.

(cherry picked from commit 5e26c46)
All our tests contain very minimalistic processes in order to be able to test something very specific. These new tests contain a bigger process with lots of different types of elements. This would be more in line with a process our users will be testing.

These tests can now serve as an example for users, as well as verifying our assertions will remain functional when testing more complex processes.

(cherry picked from commit fd11b2e)
In our testing Utilities class we had some helper methods to send variables. These methods did not allow for sending message with variables. Now they do.

Note: our testing Utilities are not exposed to users. There are no backwards compatibility concerns here.
(cherry picked from commit 6b523d0)
Our utility method completeTask would look for any jobs with a specific elementId that were created. It would not filter out jobs that were already completed. Because of this, if a process passed an element multiple times, we were only able to complete one job.

This fix filters out the jobs that were already completed. This way we can keep completing the task until there are no more jobs available.

(cherry picked from commit 3f10e8b)
@github-actions github-actions bot mentioned this pull request Mar 30, 2022
7 tasks
@remcowesterhoud remcowesterhoud merged commit cf2af78 into stable/8.0 Mar 30, 2022
@remcowesterhoud remcowesterhoud deleted the backport-276-to-stable/8.0 branch March 30, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant