-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][client] Fix PulsarAdmin description check and add test #24734
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
[fix][client] Fix PulsarAdmin description check and add test #24734
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a missing validation in PulsarAdmin's description field and adds comprehensive test coverage. The fix ensures that client descriptions are limited to 64 characters, matching the existing validation in PulsarClient.
- Add description length validation (64 character limit) to PulsarAdminBuilderImpl
- Add test coverage for valid and invalid description lengths for both PulsarClient and PulsarAdmin
- Remove orphaned test from PulsarAdminImplTest that was moved to the appropriate test class
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| PulsarAdminBuilderImpl.java | Added description length validation with 64 character limit |
| ClientBuilderImplTest.java | Added tests for valid description and description length validation |
| PulsarAdminBuilderImplTest.java | Added tests for valid description and description length validation |
| PulsarAdminImplTest.java | Removed misplaced test that belonged in builder test class |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...-admin/src/test/java/org/apache/pulsar/client/admin/internal/PulsarAdminBuilderImplTest.java
Outdated
Show resolved
Hide resolved
7839b3e to
12850d0
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24734 +/- ##
=============================================
+ Coverage 38.32% 74.15% +35.82%
- Complexity 13038 33222 +20184
=============================================
Files 1843 1900 +57
Lines 144271 148379 +4108
Branches 16730 17204 +474
=============================================
+ Hits 55292 110030 +54738
+ Misses 81463 29559 -51904
- Partials 7516 8790 +1274
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
(cherry picked from commit 8d7a28c)
Motivation
#24729 adds the client description for PulsarAdmin, which didn't consider the description length.
Modifications
Documentation
docdoc-requireddoc-not-neededdoc-complete