poorbarcode commented on code in PR #20261:
URL: https://github.com/apache/pulsar/pull/20261#discussion_r1188063931
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicPoliciesTest.java:
##########
@@ -133,6 +133,20 @@ public void cleanup() throws Exception {
super.internalCleanup();
}
+ @Test
+ public void updatePropertiesForAutoCreatedTopicTest() throws Exception {
+ TopicName topicName = TopicName.get(
+ TopicDomain.persistent.value(),
+ NamespaceName.get(myNamespace),
+ "test-" + UUID.randomUUID()
+ );
+ String testTopic = topicName.toString();
+ Producer<byte[]> producer =
pulsarClient.newProducer().topic(testTopic).create();
Review Comment:
+1
And suggestion to remove this topic.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:
##########
@@ -665,7 +665,7 @@ protected CompletableFuture<Void>
internalUpdatePropertiesAsync(boolean authorit
return validateTopicOwnershipAsync(topicName, authoritative)
.thenCompose(__ -> validateTopicOperationAsync(topicName,
TopicOperation.UPDATE_METADATA))
.thenCompose(__ -> {
- if (topicName.isPartitioned()) {
+ if (!topicName.isPartitioned()) {
Review Comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]