michaeljmarshall commented on code in PR #20245: URL: https://github.com/apache/pulsar/pull/20245#discussion_r1218261086
########## 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: Pulsar tests take a long time to run. This test is only verifying correct counting of a queue. Perhaps a faster solution might use futures that are completed at specific locations in the test to verify the behavior. -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org