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: KafkaProducerTest - Fix resource leakage and replace explicit invocation of close() method with try with resources #18678

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

pramithas
Copy link
Contributor

@pramithas pramithas commented Jan 23, 2025

In few tests, producer.close() method was not called. Thus, wrapped the logic of producer creation inside try with resources.

Also, wherever the resources were closed with explicit invocation of close() method, I replaced those with try with resources.

All the tests are passing after the changes.

Committer Checklist (excluded from commit message)

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

@github-actions github-actions bot added triage PRs from the community producer tests Test fixes (including flaky tests) clients labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients producer tests Test fixes (including flaky tests) triage PRs from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant