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

Refactor the ElasticsearchExporter tests #9321

Closed
Tracked by #8609
npepinpe opened this issue May 6, 2022 · 0 comments · Fixed by #9380
Closed
Tracked by #8609

Refactor the ElasticsearchExporter tests #9321

npepinpe opened this issue May 6, 2022 · 0 comments · Fixed by #9380
Labels
area/test Marks an issue as improving or extending the test coverage of the project kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. version:8.1.0-alpha2 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0

Comments

@npepinpe
Copy link
Member

npepinpe commented May 6, 2022

Description

The main goals here were:

  • Cover as much as possible via only unit tests. This gives us a faster feedback cycle when changing something - developers can focus on first fixing unit tests, which have smaller blast radius and faster execution, before even looking at integration tests.
  • Narrow the scope of the integration tests as much as possible. This meant getting rid of the broker, workflow engine semantics, etc., and just testing the integration of the exporter instance with Elasticsearch.
@npepinpe npepinpe added kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. team/process-automation area/test Marks an issue as improving or extending the test coverage of the project labels May 6, 2022
@npepinpe npepinpe self-assigned this May 6, 2022
@npepinpe npepinpe removed their assignment May 9, 2022
zeebe-bors-camunda bot added a commit that referenced this issue May 31, 2022
9379: Refactor ElasticsearchExporter unit tests r=npepinpe a=npepinpe

## Description

This PR refactors the `ElasticsearchExporter` unit tests. It merges the flush and configuration tests, and comes with a set of utilities to programmatically manipulate the configuration (specifically the indexing configuration).

Refactoring the integration test will be done in the next PR (which will be followed by a clean up one).

## Related issues

related to #9321 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this issue Jun 2, 2022
9380: Refactor ElasticsearchExporter integration tests r=npepinpe a=npepinpe

## Description

This PR refactors the ES exporter integration tests into two different classes: `ElasticsearchExporterIT`, and `FaultToleranceIT`. The latter is split into its own as it needs to manipulate the Elastic instance during the test, meaning it may not play nice with the other tests.

The bulk of the tests are in `ElasticsearchExporterIT`. These tests share a single static Elastic container, and use a different, unique index prefix (`config.index.prefix`) for test isolation. Most of the pre-existing tests were rolled into these ones. In the future, it's expected most tests will also go there as well.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #9321 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Marks an issue as improving or extending the test coverage of the project kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. version:8.1.0-alpha2 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants