You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/03 15:04:25 UTC

[GitHub] [pulsar] liangyepianzhou commented on a change in pull request #14111: [Flaky-test] Fix PerformanceTransactionTest.testConsumeTxnMessage

liangyepianzhou commented on a change in pull request #14111:
URL: https://github.com/apache/pulsar/pull/14111#discussion_r798656700



##########
File path: pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceTransactionTest.java
##########
@@ -231,8 +231,15 @@ public void testConsumeTxnMessage() throws InterruptedException, PulsarClientExc
             Message<byte[]> message = consumer.receive(2, TimeUnit.SECONDS);
             Assert.assertNotNull(message);
         }
-        Message<byte[]> message = consumer.receive(2, TimeUnit.SECONDS);
-        Assert.assertNull(message);
+        for (int i = 0; i < 500; i++) {

Review comment:
       1. This test sends 505 messages and then consumes 500 in `PerformanceConsume`. The behavior we expect is to consume the remaining 5, but not the other 500.
   2. In the previous test, the message may occasionally be consumed due to message retransmission.
   3. This change only tests that the messages are actually consumed in the `PerformanceConsume`, and can no longer receive all the messages with the same subscription




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org