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

Integration/compatibility layer with zeebe-process-test #316

Merged
merged 7 commits into from
Jul 23, 2022
Merged

Conversation

npepinpe
Copy link
Collaborator

@npepinpe npepinpe commented Jul 19, 2022

Description

This PR adds a new module, engine, which provides a ZeebeTestEngine implementation backed by either a container or a cluster.

The implementations define idle/busy state based on the rate of records exported (idle being no records within a certain period, and busy being at least one record within a certain period). It also allows for a grace period to be defined, meaning one can omit calls to ZeebeTestEngine#waitForIdleState(Duration) (with some caveats).

The main entry point of the module is the interface ContainerEngine, which extends both Startable and ZeebeTestEngine. By extending Startable, we can let the Testcontainers extension manage the lifecycle of our containers/engine.

Additionally, the concrete implementations implement TestLifecycleAware, which allows us to do pre/post test tasks, such as initializing the BpmnAssert record source, and printing out the log on failure.

Pull Request Checklist

  • All commit messages match our commit message guidelines
  • The submitting code follows our code style
  • If submitting code, please run mvn clean install -DskipTests locally before committing
  • Ensure all PR checks are green

@npepinpe npepinpe marked this pull request as ready for review July 22, 2022 15:15
Adds a new module, `engine`, which provides a `ZeebeTestEngine`
implementation backed by either a container or a cluster.

The implementations define idle/busy state based on the rate of records
exported (idle being no records within a certain period, and busy being
at least one record within a certain period). It also allows for a grace
period to be defined, meaning one can omit calls to
`ZeebeTestEngine#waitForIdleState(Duration)` (with some caveats).

The main entry point of the module is the interface `ContainerEngine`,
which extends both `Startable` and `ZeebeTestEngine`. By extending
`Startable`, we can let the Testcontainers extension manage the
lifecycle of our containers/engine.

Additionally, the concrete implementations implement
`TestLifecycleAware`, which allows us to do pre/post test tasks, such as
initializing the `BpmnAssert` record source, and printing out the log on
failure.
@npepinpe npepinpe merged commit de34a61 into main Jul 23, 2022
@npepinpe npepinpe deleted the np-zpt branch July 23, 2022 10:46
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