You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "mattisonchao (via GitHub)" <gi...@apache.org> on 2023/07/05 08:15:40 UTC
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #20717: [feat][test] Support delay messages in a random number of seconds by the range
mattisonchao commented on code in PR #20717:
URL: https://github.com/apache/pulsar/pull/20717#discussion_r1252729925
##########
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/PerformanceProducer.java:
##########
@@ -615,6 +621,12 @@ private static void runProducer(int producerId,
}
if (arguments.delay > 0) {
messageBuilder.deliverAfter(arguments.delay, TimeUnit.SECONDS);
+ } else {
+ if (arguments.delayRange != null) {
+ final long deliverAfter = ThreadLocalRandom.current()
+ .nextLong(arguments.delayRange.lowerEndpoint(), arguments.delayRange.upperEndpoint());
Review Comment:
fixed
--
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