-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
add test for auto-created partitioned system topic #11545
add test for auto-created partitioned system topic #11545
Conversation
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
name = topicName.getLocalName(); | ||
} | ||
return EVENTS_TOPIC_NAMES.contains(name); | ||
return EVENTS_TOPIC_NAMES.contains(TopicName.get(topicName.getPartitionedTopicName()).getLocalName()); |
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.
Please add a unit test to cover partitionedTopic and non-partitionedTopic
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.
TopicName#getPartitionedTopicName
will check whether topic
is partitioned and give the corresponding solution to handle these two situations. That’s why I did this simplification.
Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks) |
Sorry for missing some descriptions. This PR does not need to update docs. Dependencies (does it add or upgrade a dependency): no |
@315157973 Could you please check the @wuzhanpeng's comment? |
(cherry picked from commit 27dcb0a)
Motivations
When I tried to enable topic-level policy, I found that the tests for interacting with partitioned system topic (e.g.
__change_events
) was not very sufficient, so I added a test for using auto-created partitioned system topic.Modifications
EventsTopicNames#checkTopicIsEventsNames
to avoid unnecessary inspections (based on maxTopicsPerNamespace check should exclude system topic. #10850 )