Skip to content

MINOR: Cleanups in Test Common Module #19775

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

Merged
merged 6 commits into from
May 25, 2025

Conversation

sjhajharia
Copy link
Contributor

@sjhajharia sjhajharia commented May 20, 2025

Now that Kafka Brokers support Java 17, this PR makes some changes in
test-common module. The changes mostly include:

  • Collections.emptyList(), Collections.singletonList() and
    Arrays.asList() are replaced with List.of()
  • Collections.emptyMap() and Collections.singletonMap() are replaced
    with Map.of()
  • Collections.singleton() is replaced with Set.of()

Reviewers: Ken Huang [email protected], Chia-Ping Tsai
[email protected]

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) labels May 20, 2025
Copy link
Collaborator

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Thank @sjhajharia for this patch, left some comments

Could you update ClusterTemplate L47 JavaDoc

@sjhajharia
Copy link
Contributor Author

Thanks @m1a2st for the review,
I have addressed the suggestions.
Requesting a re-review!

@sjhajharia sjhajharia requested a review from m1a2st May 21, 2025 16:12
@github-actions github-actions bot removed the triage PRs from the community label May 22, 2025
Copy link
Collaborator

@m1a2st m1a2st 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

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@sjhajharia thanks for this cleanup. one small comment is left. PTAL

@sjhajharia sjhajharia requested a review from chia7712 May 23, 2025 03:40
@sjhajharia
Copy link
Contributor Author

Hey @chia7712 ,
I had to revert the change suggested by you. The reason is that the method is used in a different way by the test in that class. Removal led to test failures.

@chia7712
Copy link
Member

I had to revert the change suggested by you. The reason is that the method is used in a different way by the test in that class. Removal led to test failures.

you are right, Please ignore my previous comment 😢

@sjhajharia
Copy link
Contributor Author

No worries @chia7712
This PR is ready for review.
TIA!

@chia7712 chia7712 merged commit 2fe447a into apache:trunk May 25, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants