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/09/10 06:15:57 UTC

[GitHub] [pulsar] MarvinCai commented on a diff in pull request #17389: [fix][flaky-test]Fix PersistentSubscriptionMessageDispatchStreamingDispatcherThrottlingTest.testMultiLevelDispatch

MarvinCai commented on code in PR #17389:
URL: https://github.com/apache/pulsar/pull/17389#discussion_r967603515


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SubscriptionMessageDispatchThrottlingTest.java:
##########
@@ -467,15 +467,14 @@ private void testDispatchRate(SubscriptionType subscription,
         long start = System.currentTimeMillis();
         // Asynchronously produce messages
         for (int i = 0; i < numProducedMessages; i++) {
-            producer.send(new byte[expectRate / 10]);
+            producer.sendAsync(new byte[expectRate / 10]);
         }
         latch.await();
         Assert.assertEquals(totalReceived.get(), numProducedMessages, 10);
         long end = System.currentTimeMillis();
         log.info("-- end - start: {} ", end - start);
 
         // first 10 messages, which equals receiverQueueSize, will not wait.
-        Assert.assertTrue((end - start) >= 2500);

Review Comment:
   can you help explain this new assert? before each message size is rate/10 and we send 30 message, so should take at least 3 second to receive all, but I don't quite understand what this new assert is trying to prove?



-- 
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