You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/09/14 14:18:11 UTC
(pulsar) 09/17: [fix][test] Await both DLQ producers in multi-consumer test (#26561)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 74c8c9fd19b96917f1ee854e157ed006aa03d1f3
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Sun Sep 13 18:14:33 2026 +0300
[fix][test] Await both DLQ producers in multi-consumer test (#26561)
(cherry picked from commit e0ed7749a6b0aecb30d2bf482f328ca54c44cca7)
---
.../test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java
index c365bc31b90d..8e858327111f 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/DeadLetterTopicTest.java
@@ -1343,11 +1343,10 @@ public class DeadLetterTopicTest extends ProducerConsumerBase {
.pollInterval(Duration.ofSeconds(1)).untilAsserted(() -> {
assertTrue(admin.namespaces().getTopics("my-property/my-ns").contains(deadLetterTopic));
assertTrue(admin.topics().getSubscriptions(deadLetterTopic).contains(dlqInitialSub));
+ // Each consumer creates its DLQ producer asynchronously after its final redelivery.
+ assertEquals(admin.topics().getStats(deadLetterTopic).getPublishers().size(), 2);
});
- // We should assert that all consumers are able to produce messages to DLQ
- assertEquals(admin.topics().getStats(deadLetterTopic).getPublishers().size(), 2);
-
Consumer<byte[]> deadLetterConsumer = newPulsarClient.newConsumer(Schema.BYTES)
.topic(deadLetterTopic)
.subscriptionName(dlqInitialSub)