-
Notifications
You must be signed in to change notification settings - Fork 557
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
[EPIC] Refactor Elasticsearch Exporter Tests #8609
Comments
8608: Remove `zeebe-test` leftovers r=oleschoenburg a=oleschoenburg ## Description * **Removes the `zeebe-test` module** * Moves `protocol-jackson` integration test to qa module * Moves the remaining utilities from `zeebe-test` to the elasticsearch exporter tests ## Related issues closes #8549 next follow-up: #8609 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
CurrentlyThis is an overview of the current tests in the elasticsearch module. There is one class with unit tests and a couple more for integration tests. Unit Tests in
|
8633: Remove elasticsearch exporter TLS test r=oleschoenburg a=oleschoenburg ## Description This test was only testing the interaction between the official client and docker container and wasn't providing much value. ## Related issues <!-- Which issues are closed by this PR or are related --> relates to #8609 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
8631: Refactor elasticsearch exporter unit tests r=oleschoenburg a=oleschoenburg ## Description This is a rewrite of the old unit tests from `ElasticsearchExporterTest`. * Removes various `Mock*` classes and prefers creating mocks as necessary per test. * Splits the unit tests into three classes, one for flush-related tests, one for configuration and one for the rest. * Removes the dependency on broker internals in the unit tests. They are still required for integration tests though. ## Related issues <!-- Which issues are closed by this PR or are related --> relates to #8609 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
8631: Refactor elasticsearch exporter unit tests r=oleschoenburg a=oleschoenburg ## Description This is a rewrite of the old unit tests from `ElasticsearchExporterTest`. * Removes various `Mock*` classes and prefers creating mocks as necessary per test. * Splits the unit tests into three classes, one for flush-related tests, one for configuration and one for the rest. * Removes the dependency on broker internals in the unit tests. They are still required for integration tests though. ## Related issues <!-- Which issues are closed by this PR or are related --> relates to #8609 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
Unit tests are looking better now but we can still make some improvements to the integration tests:
|
Here's what I'm thinking of doing, in no special order. I'm adding a bit of refactoring to clean things up as well, but most likely that will be done towards the end. The end goal is that the tests should be mostly unit tests, and the integration tests living in the exporter module will only starting the exporter without the whole broker around them, and testing the integration of the exporter itself with Elastic. Again, without the broker. This should greatly reduce flakiness surrounding the tests, and additionally make them much simpler. There will still be some end to end tests in the QA module, but much less than what currently exists.
There might be more. I'll do a quick spike, then split it off in issues where applicable. Let me know if anything sounds crazy. |
Alright, so the spike was accepted and we'll now start breaking it down and merging it piece by piece. This means the end result will be something similar to #9258 Here's the breakdown:
/cc @saig0 - regarding the |
Description
The
elasticsearch-exporter
integration tests are currently quite convoluted. Historically, theelasticsearch-exporter
tests used to depend onzeebe-test
which was removed in #8608. During the removal, some of thezeebe-test
utilities ended up in theelasticsearch-exporter
module where we also needed to add a lot of test scoped dependencies.The main goals here were:
In general, I wanted to keep the same coverage as before. I think the coverage is now higher, but that was not the original motivation.
Breakdown
The text was updated successfully, but these errors were encountered: