poorbarcode commented on code in PR #23931:
URL: https://github.com/apache/pulsar/pull/23931#discussion_r1968786694


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/ConsumerStatsTest.java:
##########
@@ -480,6 +480,10 @@ public void testAvgMessagesPerEntry() throws Exception {
         metadataConsumer.put("matchValueReschedule", "producer2");
         @Cleanup
         Consumer<String> consumer = 
pulsarClient.newConsumer(Schema.STRING).topic(topic).properties(metadataConsumer)
+                // Since https://github.com/apache/pulsar/pull/23931 improved 
the performance of delivery, the consumer
+                // will get more messages than before(it only receives 1 
messages at the first delivery), we set queue
+                // size to `1` to keep the test passing.
+                .receiverQueueSize(1)

Review Comment:
   @codelipenghui 
   
   - The main purpose of the test is the mechanism of `AvgMessagesPerEntry`: 
`Math.round( {pervious avg} * 0.9 + {new avg} * 0.1 )`
   - Without a param `queueSize`, we need at least send `1000` messages 😂 
   - I changed the `queueSize` to `20` and changed the test



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to