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

MINOR: Use Mockito's strict stubs functionality for Connect tests and cleanup unused stubs #14166

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

yashmayya
Copy link
Contributor

Mockito JUnit Runner triggers UnnecessaryStubbingException only when none of the test methods use the stubbings. This means that it is ok to put default stubbing in a 'setup' method or in test class constructor. That default stubbing needs to be used at least once by one of the test methods.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@yashmayya yashmayya added connect tests Test fixes (including flaky tests) labels Aug 8, 2023
@yashmayya
Copy link
Contributor Author

@C0urante @mimaison would either of you be able to review this minor cleanup?

Copy link
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@mimaison mimaison merged commit f233943 into apache:trunk Aug 9, 2023
@yashmayya
Copy link
Contributor Author

Thanks Mickael!

jeqo pushed a commit to aiven/kafka that referenced this pull request Aug 15, 2023
… cleanup unused stubs (apache#14166)


Reviewers: Mickael Maison <mickael.maison@gmail.com>
jeqo pushed a commit to jeqo/kafka that referenced this pull request Aug 15, 2023
… cleanup unused stubs (apache#14166)


Reviewers: Mickael Maison <mickael.maison@gmail.com>
jeqo pushed a commit to jeqo/kafka that referenced this pull request Aug 15, 2023
… cleanup unused stubs (apache#14166)


Reviewers: Mickael Maison <mickael.maison@gmail.com>
rreddy-22 pushed a commit to rreddy-22/kafka-rreddy that referenced this pull request Sep 20, 2023
… cleanup unused stubs (apache#14166)


Reviewers: Mickael Maison <mickael.maison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connect tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants