This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new fe2d6d3380f [fix][client] Exit when no msg to consume if time reaches 
the limit (#21622)
fe2d6d3380f is described below

commit fe2d6d3380fbba45e508d8fdce92c7ea1a0ca864
Author: Lishen Yao <[email protected]>
AuthorDate: Tue Dec 5 14:49:09 2023 +0800

    [fix][client] Exit when no msg to consume if time reaches the limit (#21622)
    
    Co-authored-by: Jiwe Guo <[email protected]>
---
 .../java/org/apache/pulsar/testclient/PerformanceConsumer.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
 
b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
index 9bd74be3aa8..bcdb981e1eb 100644
--- 
a/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
+++ 
b/pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceConsumer.java
@@ -505,6 +505,14 @@ public class PerformanceConsumer {
 
             reportHistogram.reset();
             oldTime = now;
+
+            if (arguments.testTime > 0) {
+                if (now > testEndTime) {
+                    log.info("------------------- DONE 
-----------------------");
+                    PerfClientUtils.exit(0);
+                    thread.interrupt();
+                }
+            }
         }
 
         pulsarClient.close();

Reply via email to