michaeljmarshall commented on code in PR #20245:
URL: https://github.com/apache/pulsar/pull/20245#discussion_r1218857601


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java:
##########
@@ -4109,6 +4109,35 @@ public void testGetStats() throws Exception {
         consumer.close();
         producer.close();
     }
+    @Test(timeOut = 100000)
+    public void testMessageListenerGetStats() throws Exception {
+        final String topicName = "persistent://my-property/my-ns/testGetStats" 
+ UUID.randomUUID();
+        final String subName = "my-sub";
+        final int receiveQueueSize = 100;
+        @Cleanup
+        PulsarClient client = newPulsarClient(lookupUrl.toString(), 100);
+        Producer<String> producer = pulsarClient.newProducer(Schema.STRING)
+                .enableBatching(false).topic(topicName).create();
+        ConsumerImpl<String> consumer = (ConsumerImpl<String>) 
client.newConsumer(Schema.STRING)
+                .messageListener((MessageListener<String>) (consumer1, msg) -> 
{
+                    try {
+                        TimeUnit.SECONDS.sleep(10);

Review Comment:
   I ran this test locally, and it is only 3 seconds. Since we're not reusing 
the client, this test is fine.



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