-
Notifications
You must be signed in to change notification settings - Fork 346
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
[Improve] Implement GetTopicAutoCreation #1151
[Improve] Implement GetTopicAutoCreation #1151
Conversation
@@ -20,5 +20,5 @@ package utils | |||
type TopicAutoCreationConfig struct { | |||
Allow bool `json:"allowAutoTopicCreation"` | |||
Type TopicType `json:"topicType"` | |||
Partitions int `json:"defaultNumPartitions"` | |||
Partitions *int `json:"defaultNumPartitions"` |
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.
it's not allowed to pass the partitions
argument when the type is non-partitioned
, so need to set this as a pointer
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.
Is it possible to add a test for it?
@RobertIndie There are no tests for the |
I don't think we need a PIP for that. We can utilize the existing testing framework. Seems that you can just create a test go file and write the test. I have created a PR to show how to do it: #1152 Then you can refer to these scripts to run the tests: https://github.com/apache/pulsar-client-go/tree/master/scripts . It will run in the CI: https://github.com/apache/pulsar-client-go/blob/master/.github/workflows/ci.yml#L50 |
I see, there will be a pulsar instance for testing, added some tests for topic auto-creation @RobertIndie |
(If this PR fixes a github issue, please add
Fixes #<xyz>
.)Fixes #
(or if this PR is one task of a github issue, please add
Master Issue: #<xyz>
to link to the master issue.)Master Issue: #
Motivation
The
GetTopicAutoCreation
endpoint is missed, needs to add itModifications
Implement the
GetTopicAutoCreation
methodVerifying this change
Make sure that the change passes the CI checks.
Added some tests for topic auto-creation
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation