Skip to content

Commit

Permalink
[fix][test] Add reconsumeLater call in RetryTopicTest#testRetryTopicW…
Browse files Browse the repository at this point in the history
…ithMultiTopic. (#23857)

(cherry picked from commit 8015795)
  • Loading branch information
thetumbled authored and lhotari committed Jan 17, 2025
1 parent 54a7efd commit 339b270
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public void testRetryTopicNameForCompatibility () throws Exception {
}

/**
* The test is disabled {@link https://github.com/apache/pulsar/issues/2647}.
* Test retry topic with multiple topics
* @throws Exception
*/
@Test
Expand All @@ -482,7 +482,6 @@ public void testRetryTopicWithMultiTopic() throws Exception {
.subscriptionName("my-subscription")
.subscriptionType(SubscriptionType.Shared)
.enableRetry(true)
.ackTimeout(1, TimeUnit.SECONDS)
.deadLetterPolicy(DeadLetterPolicy.builder().maxRedeliverCount(maxRedeliveryCount).build())
.receiverQueueSize(100)
.subscriptionInitialPosition(SubscriptionInitialPosition.Earliest)
Expand Down Expand Up @@ -518,6 +517,7 @@ public void testRetryTopicWithMultiTopic() throws Exception {
Message<byte[]> message = consumer.receive();
log.info("consumer received message : {} {} - total = {}",
message.getMessageId(), new String(message.getData()), ++totalReceived);
consumer.reconsumeLater(message, 1, TimeUnit.SECONDS);
} while (totalReceived < sendMessages * (maxRedeliveryCount + 1));

int totalInDeadLetter = 0;
Expand Down

0 comments on commit 339b270

Please sign in to comment.