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 ElasticsearchClient unit tests #9358

Merged
merged 4 commits into from
May 30, 2022
Merged

Refactor ElasticsearchClient unit tests #9358

merged 4 commits into from
May 30, 2022

Conversation

npepinpe
Copy link
Member

Description

This PR refactors the ElasticsearchClient unit tests to cover what the client is now responsible for: flushing and flushing logic, and communication with Elastic.

This removes one unit tests which was previously in ElasticsearchClientIT, and removes the ElasticsearchExporterFlushTest, which are now simply nested in ElasticsearchClientTest.

Related issues

closes #9330

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

@npepinpe
Copy link
Member Author

I think the CodeQL stuff can be ignored for this review as it's just repeating the existing alerts (for some reason) 🤔

Base automatically changed from 9340-extract-record-buffer to main May 12, 2022 09:37
@npepinpe npepinpe requested a review from saig0 May 12, 2022 10:10
@npepinpe
Copy link
Member Author

Now there's a flaky update test, but I don't see how this PR would have affected it.

Copy link
Member

@saig0 saig0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@npepinpe nice 👍 LGTM 🚀

@saig0
Copy link
Member

saig0 commented May 30, 2022

bors merge

ghost pushed a commit that referenced this pull request May 30, 2022
9358: Refactor ElasticsearchClient unit tests r=saig0 a=npepinpe

## Description

This PR refactors the `ElasticsearchClient` unit tests to cover what the client is now responsible for: flushing and flushing logic, and communication with Elastic.

This removes one unit tests which was previously in `ElasticsearchClientIT`, and removes the `ElasticsearchExporterFlushTest`, which are now simply nested in `ElasticsearchClientTest`.

## Related issues

closes #9330 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
@ghost
Copy link

ghost commented May 30, 2022

Build failed:

@npepinpe
Copy link
Member Author

Some flaky tests related to containers running out of memory :(

bors retry

ghost pushed a commit that referenced this pull request May 30, 2022
9358: Refactor ElasticsearchClient unit tests r=saig0 a=npepinpe

## Description

This PR refactors the `ElasticsearchClient` unit tests to cover what the client is now responsible for: flushing and flushing logic, and communication with Elastic.

This removes one unit tests which was previously in `ElasticsearchClientIT`, and removes the `ElasticsearchExporterFlushTest`, which are now simply nested in `ElasticsearchClientTest`.

## Related issues

closes #9330 



Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
@ghost
Copy link

ghost commented May 30, 2022

Build failed:

@npepinpe
Copy link
Member Author

Same issue again :(

Merging manually as bors is currently silent, and I'm pretty sure this PR did not affect the integration tests.

@npepinpe npepinpe merged commit 5743d8f into main May 30, 2022
@npepinpe npepinpe deleted the 9330-client-unit branch May 30, 2022 08:56
@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
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 this pull request may close these issues.

Refactor client's unit to focus on the client's reduced responsibilities
4 participants