Skip to content

Conversation

@frankvicky
Copy link
Contributor

To avoid resource leak, we should close AdminClient after test.

Committer Checklist (excluded from commit message)

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

@AfterAll
public static void closeCluster() {
if (adminClient != null) {
adminClient.close();
Copy link
Member

Choose a reason for hiding this comment

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

what about doing this quietly (reusing Utils.closeQuietly)

Copy link
Contributor Author

@frankvicky frankvicky Jul 26, 2024

Choose a reason for hiding this comment

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

That would be more concise, thanks for the suggestion 😄

@frankvicky
Copy link
Contributor Author

Hi @lianetm
Thanks for feedback, I have make a little changes, PTAL 😸

@gharris1727 gharris1727 added streams tests Test fixes (including flaky tests) labels Jul 26, 2024
@mjsax mjsax merged commit a07294a into apache:trunk Jul 26, 2024
@mjsax
Copy link
Member

mjsax commented Jul 26, 2024

Thanks for the fix @frankvicky! Merged to trunk.

abhi-ksolves pushed a commit to ksolves/kafka that referenced this pull request Jul 31, 2024
…inClient (apache#16692)

To avoid a resource leak, we need to close the AdminClient after the test.

Reviewers: Lianet Magrans <lianetmr@gmail.com>, Matthias J. Sax <matthias@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants