myzhan / locust4j

Locust4j is a load generator for locust, written in Java.
MIT License
81 stars 30 forks source link

num_clients renamed to num_users #18

Closed benviss closed 4 years ago

benviss commented 4 years ago

Trying to run local locust instance and creating tasks with locust4j.

Null reference exception: [Thread-2receive-from-client] ERROR com.github.myzhan.locust4j.runtime.Runner - Error while receiving a message java.lang.NullPointerException at com.github.myzhan.locust4j.runtime.Runner.hatchMessageIsValid(Runner.java:200) at com.github.myzhan.locust4j.runtime.Runner.onMessage(Runner.java:235) at com.github.myzhan.locust4j.runtime.Runner.access$500(Runner.java:32) at com.github.myzhan.locust4j.runtime.Runner$Receiver.run(Runner.java:316) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

Their github indicates a change in argument from num_clients to num_users: https://github.com/locustio/locust/pull/1314/commits/26573d8f3501f02b8584e1c3848ca7b955c47cdf

myzhan commented 4 years ago

Thanks, working on a new version to keep compatible with the latest version of locust.

https://github.com/myzhan/locust4j/commit/7c3572c7ed71522bab6c982cee085d5b2b5eb795

benviss commented 4 years ago

Thanks, you're a legend

myzhan commented 4 years ago

This issue is fixed in version 1.0.10.