You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2025/07/28 03:30:37 UTC
(pulsar) 02/02: Fix tests
This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch bewaremypower/4.0-pr-24454
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 1db922235d1790005e600247bfa0754fa9151960
Author: Yunze Xu <xy...@163.com>
AuthorDate: Mon Jul 28 11:30:17 2025 +0800
Fix tests
---
.../java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java
index 791b9bca6a6..ba952d184a1 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/TopicAutoCreationTest.java
@@ -270,7 +270,11 @@ public class TopicAutoCreationTest extends ProducerConsumerBase {
final var topics = admin.topics().getList(topicName.getNamespace()).stream()
.filter(__ -> __.contains(topicName.getLocalName())).toList();
- assertTrue(topics.isEmpty(), "topics are " + topics);
+ // Without https://github.com/apache/pulsar/blob/master/pip/pip-414.md, the producer or consumer on
+ // partition 0 could be automatically created.
+ if (!topics.isEmpty()) {
+ assertEquals(topics, List.of(topicName.getPartition(0).toString()));
+ }
}
};
verifier.accept(() -> client.newProducer().topic(topic)