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: move logic out of client for easier unit testing #19183

Merged
merged 10 commits into from
Dec 5, 2024

Conversation

iliakur
Copy link
Contributor

@iliakur iliakur commented Dec 4, 2024

What does this PR do?

This is a big PR, so I split it into meaningful commits!
At the same time, the commits are incremental steps to the final result. So it makes sense to review them all in sequence as a story in a way.

Motivation

We need to expand the test coverage for this integration in response to support cases (and to prevent new ones).

Unit tests are better suited for this, but they work best with as little as possible mocking.

The existing code structure encouraged more extensive mocking thus reducing coverage that we could achieve with unit tests.

FUN FACT: our branch coverage by unit tests went from 66% to 92%. Without adding any new unit tests!

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 91.97861% with 15 lines in your changes missing coverage. Please review.

Project coverage is 87.25%. Comparing base (6c94834) to head (c26ad0a).
Report is 13 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
kafka_consumer 92.77% <91.97%> (+38.51%) ⬆️
presto ?
solr ?

Flags with carried forward coverage won't be shown. Click here to find out more.

@iliakur iliakur marked this pull request as ready for review December 5, 2024 10:26
@iliakur iliakur requested a review from a team as a code owner December 5, 2024 10:26
@iliakur iliakur added this pull request to the merge queue Dec 5, 2024
Merged via the queue into master with commit e410940 Dec 5, 2024
53 of 54 checks passed
@iliakur iliakur deleted the ik/AI-4645/kafka-consumer-tests branch December 5, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants