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.
Please add a unit test to cover partitionedTopic and non-partitionedTopic
There was a problem hiding this comment.
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#checkTopicIsEventsNamesto avoid unnecessary inspections (based on maxTopicsPerNamespace check should exclude system topic. #10850 )