You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by bo...@apache.org on 2022/07/14 11:17:46 UTC

[pulsar] branch master updated: [fix][flaky-test] fix cumulative ack test after abort redeliver message by users (#16592)

This is an automated email from the ASF dual-hosted git repository.

bogong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 86295be9d61 [fix][flaky-test] fix cumulative ack test after abort redeliver message by users (#16592)
86295be9d61 is described below

commit 86295be9d6162aef556a93b7a03f30fc1de893f5
Author: congbo <39...@users.noreply.github.com>
AuthorDate: Thu Jul 14 19:17:38 2022 +0800

    [fix][flaky-test] fix cumulative ack test after abort redeliver message by users (#16592)
    
    ### Motivation
    since https://github.com/apache/pulsar/pull/14371 merged, when the client abort txn with cumulative ack, We need to the redeliver message manually
    
    ### Modifications
    change test when transaction abort with cumulative ack, redeliver message manually
    ### Verifying this change
---
 .../test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java
index b372f0b61c5..72eef04bad9 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/TransactionEndToEndTest.java
@@ -606,6 +606,7 @@ public class TransactionEndToEndTest extends TransactionTestBase {
             Assert.assertNull(message);
 
             abortTxn.abort().get();
+            consumer.redeliverUnacknowledgedMessages();
             Transaction commitTxn = getTxn();
             for (int i = 0; i < messageCnt; i++) {
                 message = consumer.receive(1, TimeUnit.SECONDS);